:root{
  --bg:#f4f6fb;
  --surface:#ffffff;
  --ink:#15213a;
  --muted:#65738a;
  --line:#d9e0ea;
  --accent:#000080;
  --accent-dark:#000066;
  --accent-soft:#eef1ff;
  --green:#087c59;
  --amber:#a86209;
  --red:#b33b41;
  --side:238px;
  --radius:0px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--bg);
  font-size:14px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink)}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #98aef5;outline-offset:2px}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.tiny{width:14px;height:14px}
.shell{min-height:100vh}

.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--side);
  background:var(--surface);
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  padding:24px 15px 16px;
  z-index:10;
  overflow-y:auto;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 10px 25px;
  font-size:23px;
  letter-spacing:-1.1px;
  font-weight:800;
  line-height:1;
}
.brand-mark{
  width:40px;
  height:40px;
  background:var(--accent);
  display:grid;
  place-items:center;
  color:#fff;
  border-radius:0;
}
.brand-mark svg{width:25px;height:25px}
.brand-accent{color:var(--accent)}
.brand small{display:block;font-size:9px;letter-spacing:1.8px;font-weight:700;color:#7c889a;margin-top:6px}
.workspace{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 10px;
  border:1px solid var(--line);
  background:#fbfcff;
  border-radius:0;
  margin-bottom:23px;
}
.workspace-icon{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:800;
  border-radius:0;
}
.workspace strong,.user strong{font-size:12px;display:block}
.workspace small,.user small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.nav-group{font-size:10px;letter-spacing:1.05px;color:#8793a5;font-weight:700;padding:13px 12px 7px}
.nav-link{
  display:flex;
  align-items:center;
  gap:11px;
  width:100%;
  border:0;
  background:transparent;
  color:#56647a;
  text-align:left;
  padding:11px 12px;
  margin:2px 0;
  font-size:13px;
  font-weight:600;
  border-radius:0;
  transition:background .15s ease,color .15s ease,padding-left .15s ease;
}
.nav-link svg{width:18px;height:18px}
.nav-link:hover{background:#f5f7fc;color:var(--ink)}
.nav-link.active{
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:750;
  border-left:3px solid var(--accent);
  padding-left:9px;
}
.nav-link.active:after{content:"";margin-left:auto;width:6px;height:6px;background:var(--accent);border-radius:50%}
.sidebar-bottom{margin-top:auto;padding-top:18px}
.demo-label{color:#68758a;font-size:11px;padding:9px 8px 14px;display:flex;align-items:center;gap:6px}
.status-dot{width:7px;height:7px;background:#1ca578;border-radius:50%;display:inline-block;flex-shrink:0}
.user{border-top:1px solid var(--line);padding:15px 5px 0;display:flex;align-items:center;gap:10px}
.avatar{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  background:#e8edff;
  color:#243d9b;
  font-weight:750;
  flex-shrink:0;
  font-size:12px;
  border-radius:0;
}
.avatar-dark{background:#1b2559;color:#fff}

.main{margin-left:var(--side)}
.topbar{
  height:68px;
  background:var(--surface);
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 28px;
  gap:12px;
}
.breadcrumb,.top-actions{display:flex;align-items:center;gap:13px;color:var(--muted);font-size:12px}
.breadcrumb strong{color:var(--ink);font-weight:700}
.connection{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--green);
  font-weight:650;
  font-size:12px;
  background:#eaf8f1;
  border:1px solid #caeadb;
  padding:6px 10px;
  white-space:nowrap;
  border-radius:0;
}
.top-date{white-space:nowrap}
.icon-button{
  border:1px solid var(--line);
  background:#fff;
  width:35px;
  height:35px;
  color:#607087;
  display:inline-grid;
  place-items:center;
  border-radius:0;
}
.icon-button:hover{background:#eef2fb;color:var(--accent)}
.mobile-menu,.mobile-overlay{display:none}
.page{max-width:1510px;margin:auto;padding:27px 28px 40px}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:23px}
.eyebrow{text-transform:uppercase;font-size:10px;font-weight:750;letter-spacing:1.5px;color:var(--accent);margin-bottom:6px}
.page-heading h1{font-size:29px;letter-spacing:-.85px;margin:0 0 6px;line-height:1.15}
.page-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.55;max-width:70ch}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid transparent;
  font-weight:650;
  padding:10px 14px;
  font-size:13px;
  white-space:nowrap;
  min-height:39px;
  border-radius:0;
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}
.btn svg{width:16px;height:16px}
.btn.primary{background:var(--accent);color:#fff;box-shadow:none}
.btn.primary:hover{background:var(--accent-dark)}
.btn.secondary{background:#fff;color:#43536a;border-color:var(--line)}
.btn.secondary:hover{background:#f4f7fc}
.btn:disabled{opacity:.45;cursor:not-allowed}

.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stat,.panel{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
}
.stat{padding:17px 17px;min-width:0}
.stat-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.stat-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:0;
  background:var(--accent-soft);
  color:var(--accent);
}
.stat-icon.green{background:#e5f6ef;color:#13825c}
.stat-icon.amber{background:#fff3dd;color:#a86209}
.stat-icon.purple{background:#f1eaff;color:#8053bf}
.stat-icon svg{width:18px;height:18px}
.stat-label{font-size:12px;color:var(--muted);font-weight:600}
.stat-value{font-weight:800;font-size:26px;letter-spacing:-.7px;margin-top:10px;overflow-wrap:anywhere}
.stat-foot{font-size:11px;color:var(--muted);margin-top:4px}

.pos-grid{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:18px;align-items:start}
.panel{min-width:0}
.panel-head{padding:17px 19px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fcfdff}
.panel-head h2{font-size:15px;letter-spacing:-.2px;margin:0}
.panel-head p{font-size:12px;color:var(--muted);margin:4px 0 0}
.panel-body{padding:19px}
.panel-tag{font-size:11px;color:var(--accent);background:var(--accent-soft);padding:5px 8px;font-weight:700;white-space:nowrap;border-radius:0}

.field{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.field label{font-size:12px;color:#43536a;font-weight:650}
.field input,.field select,.search-box input{
  width:100%;
  min-width:0;
  border:1px solid #dbe2ec;
  background:#fff;
  padding:10px 11px;
  color:var(--ink);
  min-height:42px;
  border-radius:0;
}
.field input:focus,.field select:focus,.search-box input:focus{border-color:var(--accent)}

.scan-area{
  background:#f7f9ff;
  border:1px dashed #a8b5e9;
  padding:19px 16px;
  text-align:center;
  margin:6px 0 15px;
  border-radius:0;
}
.scan-icon{
  width:45px;
  height:45px;
  display:grid;
  place-items:center;
  background:#e7ecff;
  color:var(--accent);
  margin:0 auto 10px;
  border-radius:0;
}
.scan-icon svg{width:27px;height:27px}
.scan-area h3{font-size:15px;margin:0 0 5px}
.scan-area p{color:var(--muted);font-size:12px;margin:0 0 14px;line-height:1.55}
.scan-input{display:flex;gap:7px}
.scan-input input{flex:1;width:0;padding:11px;border:1px solid #c4d2f2;min-width:0;background:#fff;border-radius:0}
.scan-input .btn{padding:10px 15px}
.sample{display:flex;gap:5px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:12px;font-size:11px;color:var(--muted)}
.sample button{border:1px solid #ccd6f8;background:#eef2ff;color:var(--accent);padding:4px 7px;font-size:11px;border-radius:0}
.shortcut-row{display:flex;gap:9px;flex-wrap:wrap;font-size:11px;color:var(--muted);justify-content:space-between}
.shortcut-row span{display:flex;align-items:center;gap:4px}
kbd{font-family:inherit;font-size:10px;padding:3px 5px;border:1px solid #dce2eb;background:#f9fafc;color:#47556b;border-radius:0}

.student-top{display:flex;gap:12px;align-items:center;margin-bottom:17px}
.student-top .avatar{width:54px;height:54px;font-size:19px;border-radius:0}
.student-top h3{margin:0 0 5px;font-size:18px;letter-spacing:-.3px}
.student-top p{margin:0;color:var(--muted);font-size:12px}
.student-top .badge{margin-left:auto}
.badge{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px;font-weight:700;padding:5px 8px;background:#edf1f6;color:#647187;border-radius:0}
.badge.green{background:#e5f6ed;color:#087c59}
.badge.amber{background:#fff1d9;color:#a86209}
.badge.red{background:#fce9ea;color:#b33b41}
.badge.blue{background:var(--accent-soft);color:var(--accent)}
.status-list{border:1px solid var(--line);overflow:hidden;border-radius:0}
.status-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 11px;border-bottom:1px solid var(--line)}
.status-line:last-child{border:0}
.status-line .left{display:flex;align-items:center;gap:9px;color:#516077;font-size:12px}
.status-line svg{width:17px;height:17px;color:#78869a}
.status-line strong{font-size:13px}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.actions .btn:first-child{grid-column:1/-1}
.empty-state{text-align:center;color:var(--muted);padding:47px 16px;font-size:13px}
.empty-state .scan-icon{background:#f0f3f9;color:#8c9ab0}
.empty-state h3{color:var(--ink);font-size:16px;margin:12px 0 7px}
.empty-state p{margin:0;line-height:1.6}
.activity{margin-top:18px}

.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;text-align:left;font-size:12px;white-space:nowrap}
th{font-weight:650;color:#6c7a90;background:#f8f9fc;padding:11px 16px}
td{padding:12px 16px;border-top:1px solid #edf0f5;color:#40506a}
td strong{color:var(--ink);font-weight:650}
.table-person{display:flex;align-items:center;gap:9px}
.table-person .avatar{width:31px;height:31px;font-size:11px;border-radius:0}
.table-person small{display:block;margin-top:3px;color:var(--muted)}
.link-btn{border:0;background:transparent;color:var(--accent);font-weight:650;padding:3px 0;font-size:12px}
.link-btn:hover{text-decoration:underline}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:15px 18px;border-bottom:1px solid var(--line);background:#fcfdff}
.search-box{display:flex;align-items:center;gap:8px;color:#8290a4;min-width:180px;flex:1;max-width:340px}
.search-box input{min-height:36px;padding:8px 10px}
.filter{border:1px solid var(--line);background:#fff;padding:9px;color:#43536a;border-radius:0}
.muted{color:var(--muted)}
.note{font-size:12px;color:var(--muted);line-height:1.6;margin:14px 0 0}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.class-card{padding:19px}
.class-card h3{font-size:16px;margin:13px 0 6px}
.class-card p{margin:0 0 13px;color:var(--muted);font-size:12px;line-height:1.55}
.class-card .status-line{padding:10px 0}
.progress-track{height:8px;background:#e9edf5;overflow:hidden;border-radius:0}
.progress-track span{display:block;height:100%;background:var(--accent);border-radius:0}
.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.bar-row{display:grid;grid-template-columns:105px 1fr 52px;align-items:center;gap:8px;margin:14px 0;font-size:12px}
.bar-row strong{text-align:right}
.split-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.dialog-head,.dialog-footer{padding:16px 20px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.dialog-head{border-bottom:1px solid var(--line);background:#fcfdff}
.dialog-head h2{font-size:18px;margin:0}
.dialog-body{padding:20px;max-height:65vh;overflow:auto}
.dialog-footer{border-top:1px solid var(--line);justify-content:flex-end;background:#fcfdff}
dialog{border:1px solid var(--line);padding:0;max-width:calc(100% - 25px);width:480px;box-shadow:0 20px 50px rgba(8,20,60,.18);color:var(--ink);border-radius:0}
dialog::backdrop{background:rgba(16,24,48,.42)}
#toast{position:fixed;bottom:22px;right:22px;padding:13px 17px;background:#182d45;color:#fff;box-shadow:0 8px 24px rgba(20,34,66,.2);max-width:calc(100% - 44px);z-index:30;opacity:0;pointer-events:none;transition:opacity .15s;border-radius:0}
#toast.show{opacity:1}
.receipt{display:none}
.settings-section{max-width:720px}
.settings-section .btn{margin-right:6px;margin-bottom:6px}
.danger-btn{color:var(--red)!important}
.empty-row{text-align:center;color:var(--muted);padding:25px}
.footer-note{font-size:11px;color:#8490a3;text-align:center;margin-top:24px;line-height:1.55}
.pill-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.pill-row .badge{font-weight:600}
.metric-large{font-size:22px;font-weight:800;margin:6px 0}
.mobile-menu{display:none}

@media(max-width:1200px){
  :root{--side:214px}
  .page{padding:23px 20px}
  .topbar{padding:0 20px}
  .stat{padding:13px}
  .stat-value{font-size:23px}
  .pos-grid{gap:13px}
  .panel-body{padding:15px}
  .panel-head{padding:15px}
  .top-date{display:none}
}
@media(max-width:950px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pos-grid,.report-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  :root{--side:238px}
  .sidebar{transform:translateX(-100%);transition:transform .15s}
  .sidebar.open{transform:translateX(0)}
  .mobile-overlay.open{display:block;position:fixed;inset:0;background:rgba(20,35,61,.35);z-index:9}
  .main{margin-left:0}
  .mobile-menu{display:inline-grid}
  .topbar{height:58px;padding:0 13px}
  .breadcrumb>span,.breadcrumb>.tiny{display:none}
  .page{padding:19px 12px 30px}
  .page-heading{align-items:flex-start;gap:8px}
  .page-heading h1{font-size:24px}
  .page-heading p{font-size:12px;line-height:1.5}
  .page-heading .btn{font-size:11px;padding:8px;min-height:36px}
  .stats{gap:8px}
  .stat{padding:12px}
  .stat-value{font-size:22px}
  .stat-label{font-size:11px}
  .stat-icon{width:29px;height:29px}
  .cards{grid-template-columns:1fr}
  .panel-head h2{font-size:14px}
  .connection{font-size:10px;padding:5px 7px}
  .top-actions{gap:7px}
  .split-fields{grid-template-columns:1fr}
  .scan-input .btn{padding:10px}
  .student-top .badge{font-size:10px}
  .activity .panel-head{flex-wrap:wrap}
}
@media print{
  body>*:not(#receipt){display:none!important}
  #receipt{display:block!important;width:72mm;margin:auto;font-family:monospace;font-size:12px;color:#000}
  #receipt h2{text-align:center}
  #receipt p{margin:8px 0}
  .receipt-row{display:flex;justify-content:space-between;border-bottom:1px dashed #888;padding:6px 0}
  @page{margin:4mm}
}
