:root{
  --brand:#91ad67;
  --brand-dark:#1b9253;
  --brand-blue:#1fb8df;
  --brand-yellow:#f5be00;
  --brand-red:#e23443;
  --bg:#efefef;
}
body{background:var(--bg);color:#333;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:290px;min-height:100vh;position:sticky;top:0;align-self:flex-start;z-index:10}
.main-panel{flex:1;min-width:0}
.logo{max-width:220px}
.sidebar .nav-link{color:#666;padding:.85rem 1rem;border-radius:14px;margin-bottom:.25rem;font-weight:500}
.sidebar .nav-link:hover,.sidebar .nav-link.active{background:#ecf3e2;color:var(--brand)}
.sidebar-heading{font-weight:700;color:#222;margin:1rem 0 .8rem}
.topbar{position:sticky;top:0;z-index:9}
.stat-card{border:none;border-radius:22px;color:#fff;transition:.2s ease;text-decoration:none;display:block;min-height:145px}
.stat-card:hover{transform:translateY(-2px);color:#fff;box-shadow:0 12px 24px rgba(0,0,0,.08)}
.stat-icon{font-size:2.5rem;opacity:.9}
.card-green{background:var(--brand)}
.card-yellow{background:var(--brand-yellow)}
.card-darkgreen{background:var(--brand-dark)}
.card-blue{background:var(--brand-blue)}
.card-red{background:var(--brand-red)}
.card-white{background:#fff;color:#444}
.table-card,.form-card,.summary-card{border:none;border-radius:20px}
.table thead th{font-size:.88rem;color:#6c757d;border-bottom-width:1px}
.badge-soft{padding:.55rem .7rem;border-radius:999px;font-weight:600}
.badge-soft-success{background:#dff5e5;color:#198754}
.badge-soft-warning{background:#fff1cd;color:#9a6b00}
.badge-soft-danger{background:#fde1e4;color:#b42318}
.badge-soft-secondary{background:#eceef1;color:#555}
.student-card-preview{width:510px;height:340px;background:#efefef;border:0;padding:28px 30px;position:relative;border-radius:0;overflow:hidden}
.student-card-logo{width:190px;max-width:190px;height:auto;display:block;position:absolute;left:28px;top:28px}
.student-card-name{position:absolute;left:30px;top:128px;width:275px;max-width:275px;height:126px;font-size:56px;font-weight:800;line-height:1.25;letter-spacing:-1.5px;color:#000;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}
.student-card-school{position:absolute;left:30px;top:268px;width:280px;max-width:280px;font-size:34px;line-height:1.05;color:#000;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.student-card-id{position:absolute;right:44px;top:282px;width:170px;font-size:24px;line-height:1;text-align:center;color:#000;font-weight:700;letter-spacing:.5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.student-card-qr{position:absolute;right:42px;top:122px;width:170px;text-align:center}
.student-card-qr img{width:125;height:125px}
.scan-box{min-height:300px;border:2px dashed var(--brand);border-radius:18px;background:#fff;padding:15px}
.metric-mini{border-radius:18px;padding:1rem 1.2rem;background:#fff;border:none}
.quick-link{display:block;text-decoration:none;color:inherit}
.login-wrap{min-height:100vh;display:flex;align-items:center}
.login-hero{background:linear-gradient(180deg,#f5f8ef,#eef2e7);border-radius:24px}
@media (max-width:991px){
  .app-shell{flex-direction:column}
  .sidebar{width:100%;min-height:auto;position:static;display:none}
  .sidebar.show-mobile{display:block}
  .student-card-preview{transform:scale(.58);transform-origin:left top;margin-bottom:-120px}
}
@media print{
  .btn,.topbar,.sidebar,.alert{display:none!important}
  body{background:#fff}
}
