
:root{--bg:#f3f6fb;--card:#fff;--text:#172033;--muted:#748197;--line:#e4eaf2;--brand:#174ea6;--brand2:#2f6df6;--nav:#0d1b3e;--red:#d64545;--green:#158457;--amber:#a96106;--shadow:0 14px 38px rgba(29,49,83,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}.hidden{display:none!important}.muted{color:var(--muted)}
.btn{height:40px;border:1px solid var(--line);background:#fff;color:#2d3a50;border-radius:10px;padding:0 14px;font-weight:750;cursor:pointer;transition:.18s}.btn:hover{transform:translateY(-1px);box-shadow:0 6px 18px #172a5212}.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.danger{background:#fff2f0;border-color:#efc3bd;color:#b42318}.btn.warn{background:#fff8eb;border-color:#efd49d;color:#935900}.btn.ghost{background:#ffffff0b;color:#dbe5f5;border-color:#ffffff18}.btn.wide{width:100%;height:48px}.btn.sm{height:34px;padding:0 10px;font-size:12px}.icon-btn{border:0;background:transparent;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;cursor:pointer;color:#607089}.icon-btn:hover{background:#eef3f9}
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,#dce9ff 0,transparent 36%),linear-gradient(135deg,#f6f9ff,#eef3fb)}.login-card{width:min(430px,100%);background:#fff;border:1px solid #e8edf5;border-radius:22px;padding:30px;box-shadow:0 24px 80px #17366b18}.login-logo{display:block;width:110px;height:auto;margin:0 auto 12px}.login-title{text-align:center;font-size:27px;font-weight:900}.login-sub{text-align:center;color:var(--muted);font-size:13px;margin:5px 0 22px}.login-hint{min-height:22px;color:#b42318;font-size:13px;text-align:center;margin-bottom:2px}.login-foot{text-align:center;color:#98a3b5;font-size:12px;margin-top:14px}.field{display:block;margin:14px 0}.field>span,.label{display:block;font-size:12px;font-weight:800;color:#657187;margin-bottom:7px}.control{width:100%;height:46px;border:1px solid #d9e2ee;border-radius:11px;padding:0 13px;background:#fff;outline:0;transition:.18s}.control:focus,.textarea:focus{border-color:#7fa6f2;box-shadow:0 0 0 3px #2f6df615}.textarea{width:100%;min-height:96px;border:1px solid #d9e2ee;border-radius:11px;padding:11px 13px;resize:vertical;outline:0}.password-box{position:relative}.password-box .control{padding-right:48px}.password-box .icon-btn{position:absolute;right:5px;top:4px}
.app-shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:var(--nav);color:#fff;padding:16px 13px;display:flex;flex-direction:column}.brand{display:flex;gap:10px;align-items:center;padding:8px 8px 20px}.brand img{width:39px;height:39px;border-radius:10px;background:#fff;padding:3px;object-fit:contain}.brand b{font-size:17px}.brand small{display:block;color:#8fa0bd;font-size:11px;margin-top:3px}.side-nav{display:flex;flex-direction:column;gap:4px}.nav-btn{border:0;background:transparent;color:#aebbd0;padding:11px 12px;border-radius:10px;text-align:left;display:flex;gap:10px;align-items:center;font-weight:720;cursor:pointer}.nav-btn:hover{background:#ffffff0a;color:#fff}.nav-btn.active{background:#1b3568;color:#fff}.nav-icon{width:18px;min-width:18px;text-align:center}.side-foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;padding:12px 8px 4px;gap:10px}.version{font-size:11px;color:#7f91ae}
.main{padding:24px 26px 90px;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.topbar h1{margin:0;font-size:25px}.top-actions{display:flex;gap:8px;flex-wrap:wrap}.view{display:none}.view.active{display:block}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.metric{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 8px 24px #152b5008}.metric .k{font-size:12px;color:var(--muted);font-weight:750}.metric .v{font-size:27px;font-weight:900;margin-top:7px}.metric.featured{background:linear-gradient(135deg,#123d96,#2e6cf3);color:#fff;border:0}.metric.featured .k{color:#dbe7ff}.panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);margin-top:14px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--line)}.panel-head h3{margin:0;font-size:16px}.panel-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar .control{height:38px;width:220px}.toolbar select.control{width:auto;min-width:130px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:12px 13px;border-bottom:1px solid #edf1f6;white-space:nowrap;text-align:left}th{background:#fbfcfe;color:#6e7b91;font-size:12px}tbody tr:hover{background:#fbfdff}.name-sub{font-size:11px;color:var(--muted);margin-top:3px}.actions{display:flex;gap:6px;align-items:center}.status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:850}.status.green{background:#eaf7f1;color:#0e7950}.status.blue{background:#eaf1ff;color:#245fd0}.status.gray{background:#f0f2f5;color:#657187}.status.amber{background:#fff5df;color:#93610d}.status.red{background:#fff0ee;color:#b42318}.amount.pos{color:#0f8254}.amount.neg{color:#c23c3c}.empty{padding:34px;text-align:center;color:var(--muted)}.empty b{display:block;color:#4e5b70;margin-bottom:4px}.mobile-list{display:none}
.progress{min-width:135px}.progress-track{height:8px;border-radius:999px;background:#eef2f8;overflow:hidden}.progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#2e6cf3,#51a4ff)}.progress-meta{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:5px}.student-card{border:1px solid var(--line);border-radius:15px;padding:14px;background:#fff}.student-card+.student-card{margin-top:10px}.student-card-head{display:flex;justify-content:space-between;gap:10px}.student-card-title{font-size:16px;font-weight:900}.student-card-sub{font-size:11px;color:var(--muted);margin-top:3px}.student-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.student-card-stat{background:#f7f9fc;border-radius:10px;padding:9px}.student-card-stat span{font-size:10px;color:var(--muted);display:block}.student-card-stat b{font-size:13px;display:block;margin-top:4px}.student-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
.backdrop{position:fixed;inset:0;background:#0a142a72;z-index:50;display:flex;justify-content:flex-end}.drawer{width:min(560px,100%);height:100%;background:#fff;display:flex;flex-direction:column;box-shadow:-24px 0 60px #0f23452a}.drawer-head{padding:18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}.drawer-head h2{margin:0;font-size:20px}.drawer-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.drawer-body{padding:18px;overflow:auto;flex:1}.drawer-foot{padding:14px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-group.full{grid-column:1/-1}.form-note{padding:11px 12px;border:1px solid #e3e9f2;border-radius:11px;background:#f8fafc;color:#66758a;font-size:12px;line-height:1.5}.segmented{display:grid;grid-template-columns:1fr 1fr;background:#f1f4f8;padding:4px;border-radius:11px}.segmented button{height:38px;border:0;background:transparent;border-radius:8px;font-weight:800;color:#67758b;cursor:pointer}.segmented button.active{background:#fff;color:var(--brand);box-shadow:0 3px 10px #172a5212}.quick-amounts{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:7px}.quick-amounts button{border:1px solid var(--line);background:#fff;border-radius:8px;height:34px;cursor:pointer;font-size:12px}.picker{border:1px solid var(--line);border-radius:11px;max-height:245px;overflow:auto;margin-top:8px}.picker-item{width:100%;border:0;border-bottom:1px solid #edf1f6;background:#fff;padding:11px;display:flex;justify-content:space-between;text-align:left;cursor:pointer}.picker-item:last-child{border-bottom:0}.picker-item.selected{background:#eef5ff}.picker-item b{display:block}.picker-item small{color:var(--muted)}.owner-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.owner-item{border:1px solid var(--line);border-radius:11px;padding:11px;display:flex;gap:9px;align-items:center;cursor:pointer}.owner-item input{margin:0}.owner-item:has(input:checked){border-color:#6e98eb;background:#f1f6ff}.cred-box{background:#f6f9fe;border:1px solid #dfe8f6;border-radius:12px;padding:13px}.cred-line{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #e8eef7}.cred-line:last-child{border-bottom:0}
.confirm-backdrop{position:fixed;inset:0;background:#07122970;z-index:80;display:grid;place-items:center;padding:20px}.confirm-card{width:min(410px,100%);background:#fff;border-radius:16px;padding:20px;box-shadow:0 26px 80px #0d1b3e40}.confirm-card h3{margin:0}.confirm-card p{color:#66758a;line-height:1.6;margin:10px 0 18px}.confirm-actions{display:flex;justify-content:flex-end;gap:8px}.toast-host{position:fixed;right:18px;top:18px;z-index:100;display:grid;gap:8px}.toast{background:#172033;color:#fff;border-radius:11px;padding:11px 14px;box-shadow:0 10px 30px #0002;font-size:13px;max-width:360px}.toast.bad{background:#b42318}.toast.ok{background:#146b49}.mobile-nav{display:none}
@media(max-width:1080px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.app-shell{display:block}.sidebar{display:none}.main{padding:16px 13px 86px}.topbar{align-items:flex-start}.topbar h1{font-size:22px}.top-actions{display:none}.cards{grid-template-columns:1fr 1fr;gap:9px}.metric{padding:13px}.metric .v{font-size:22px}.panel{border-radius:14px}.panel-head{align-items:flex-start;flex-direction:column}.toolbar{width:100%}.toolbar .control,.toolbar select.control{width:100%}.table-wrap{display:none}.mobile-list{display:block;padding:10px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;height:70px;background:#fff;border-top:1px solid var(--line);z-index:30;display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom)}.mobile-nav button{border:0;background:#fff;color:#7a879b;font-size:10px;font-weight:750;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px}.mobile-nav button.active{color:var(--brand)}.mobile-nav .nav-icon{font-size:18px}.drawer{height:auto;max-height:92vh;margin-top:auto;border-radius:20px 20px 0 0}.backdrop{align-items:flex-end}.form-grid{grid-template-columns:1fr}.owner-list{grid-template-columns:1fr}.quick-amounts{grid-template-columns:repeat(3,1fr)}.toast-host{left:12px;right:12px;top:12px}.toast{max-width:none}.login-card{padding:24px 20px}.student-card-actions .btn{width:100%}}
@media(max-width:480px){.cards{grid-template-columns:1fr 1fr}.metric .v{font-size:19px}.topbar{margin-bottom:12px}}

.login-logo-mark{width:78px;height:78px;border-radius:22px;margin:0 auto 14px;display:grid;place-items:center;background:linear-gradient(135deg,#123d96,#2f6df6);color:#fff;font-size:25px;font-weight:950;letter-spacing:2px;box-shadow:0 14px 34px #245bb932}
.brand-mark{width:39px;height:39px;min-width:39px;border-radius:10px;display:grid;place-items:center;background:#fff;color:#123d96;font-weight:950;font-size:12px;letter-spacing:1px}

.login-logo-full{display:block;width:min(200px,72%);height:auto;margin:-6px auto 8px;object-fit:contain}
.brand{display:block;text-align:center;padding:8px 8px 22px}
.brand-logo-full{display:block;width:132px;height:auto;margin:0 auto;border-radius:10px;background:#fff;object-fit:contain;padding:4px}
@media(max-width:820px){.login-logo-full{width:min(180px,72%)}}
