body{margin:0;min-height:100vh;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-tap-highlight-color:transparent}:root{color-scheme:dark;--bg: #000;--surface: #0b0b0b;--surface2: #121212;--text: #f5f5f5;--muted: #8e8e93;--line: #262626;--line2: #343434;--accent: #3b82f6;--green: #8ee6a8;--greenbg: #0d2415;--red: #ff9b98;--redbg: #2a1010;--yellow: #f4cf70;--yellowbg: #2b220d;--shadow: 0 12px 34px rgba(0, 0, 0, .42)}*{box-sizing:border-box}html,body{background:var(--bg);overflow-x:hidden;scrollbar-width:none}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}body{margin:0;min-height:100vh;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.8rem,7vw,2.35rem);margin-bottom:5px;letter-spacing:-.045em}h2{font-size:1.08rem;margin-bottom:8px}h3{font-size:1rem;margin-bottom:4px}.muted{color:var(--muted)}.tiny{font-size:.78rem}.brand{font-weight:900;font-size:1.05rem;letter-spacing:-.03em}.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:15px}.hidden{display:none!important}label{display:grid;gap:7px;font-size:.86rem;font-weight:720;color:#d8d8d8}input[type=text],input[type=password],input[type=file]{width:100%;min-height:48px;border:1px solid var(--line2);border-radius:10px;padding:12px 13px;background:var(--surface2);color:var(--text);outline:none}input::placeholder{color:#656565}input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #3b82f61f}.password-wrap{position:relative}.password-wrap input{padding-right:48px}.password-eye{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:8px;background:transparent;color:#777;display:grid;place-items:center}.password-eye svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.btn{min-height:44px;border:1px solid #ddd;border-radius:9px;background:#f3f3f3;color:#090909;padding:10px 14px;font-weight:820;box-shadow:none}.btn.loading{opacity:.65;pointer-events:none;cursor:wait}.btn:active,.icon-btn:active,.save-fab:active{transform:scale(.97)}.btn.secondary{background:var(--surface2);color:var(--text);border-color:var(--line2)}.btn.danger{background:#2a1010;color:#ffb4b1;border-color:#5a2424}.btn.small{min-height:38px;padding:7px 11px;font-size:.82rem}.btn:disabled{opacity:.38;cursor:not-allowed}.icon-btn{width:40px;height:40px;display:grid;place-items:center;padding:0;border:1px solid var(--line2);border-radius:9px;background:var(--surface2);color:#eee}.icon-btn svg,.save-fab svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.icon-btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}.icon-btn.ghost:hover,.icon-btn.ghost:active{color:var(--text)}.logout-btn{border-color:transparent;background:transparent;color:var(--red)}.notice{padding:10px 11px;border-radius:8px;background:#111;color:#d8d8d8;border:1px solid var(--line2);font-size:.87rem}.notice.error{background:#241010;color:#ffb4b1;border-color:#522}.notice.success{background:#0d2114;color:#9ae6b0;border-color:#244d31}.badge-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;background:#d97706;color:#fff;font-size:.68rem;font-weight:900;border-radius:9px;margin-left:4px}.pill{display:inline-flex;border:1px solid var(--line2);border-radius:6px;padding:4px 7px;font-size:.72rem;font-weight:820;background:#111;color:#ccc}table{width:100%;border-collapse:collapse;font-size:.87rem}th,td{padding:9px 7px;border-bottom:1px solid var(--line);text-align:left}th{color:#aaa}.toast{position:fixed;left:50%;bottom:max(80px,calc(env(safe-area-inset-bottom) + 74px));transform:translate(-50%);z-index:100;width:min(92vw,520px);padding:11px 13px;border:1px solid var(--line2);border-radius:9px;background:#151515;color:#fff;box-shadow:var(--shadow);font-weight:700}.app{width:min(720px,100%);margin:auto;padding:12px 12px 40px}.stack{display:grid;gap:12px}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.grid{display:grid;grid-template-columns:1fr;gap:8px}.page-title{font-size:1.65rem;letter-spacing:-.045em;margin:6px 0 14px;text-transform:uppercase}.top-nav{position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:space-between;padding:10px 4px;background:#000000f0;backdrop-filter:blur(14px);border-bottom:1px solid var(--line);margin-bottom:18px}.top-nav-brand{display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none}.login-mark.small{width:34px;height:34px;flex:0 0 34px;border-radius:9px}.login-mark.small svg{width:17px;height:17px}.brand-title{font-weight:850;font-size:1.08rem;color:var(--text);letter-spacing:-.025em}.top-nav-actions{display:flex;align-items:center;gap:4px}.top-icon-btn{position:relative;width:38px;height:38px;border:none!important;background:transparent!important;color:#a3a3a3;border-radius:9px;display:grid;place-items:center;cursor:pointer;padding:0;transition:color .15s ease,background .15s ease;box-shadow:none!important}.top-icon-btn:hover,.top-icon-btn:active{color:#fff;background:#ffffff14!important}.top-icon-btn.danger:hover,.top-icon-btn.danger:active{color:var(--red)!important;background:var(--redbg)!important}.top-icon-btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.top-icon-btn .badge-count{position:absolute;top:3px;right:3px;min-width:16px;height:16px;font-size:.62rem;padding:0 4px;margin-left:0}.bottom-nav{display:none!important}.tab,.nav-logout{min-height:50px;border:0;background:transparent;color:#777;border-radius:15px;display:grid;place-items:center;gap:2px;padding:5px 8px;font-weight:760}.tab svg,.nav-logout svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.tab span,.nav-logout span{font-size:.68rem}.tab.active{background:#1a1a1a;color:#f5f5f5}.tab.plus-tab{font-weight:350}.nav-logout{color:var(--red)}.login-view{max-width:430px;margin:max(11vh,42px) auto 0}.login-head{display:flex;align-items:center;gap:13px;margin:0 4px 22px}.login-mark{width:46px;height:46px;position:relative;flex:0 0 46px;border:1px solid var(--line2);border-radius:11px;background:#0d0d0d;display:grid;place-items:center;color:#f5f5f5}.login-mark svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.login-panel{padding:15px;background:#090909;border:1px solid var(--line);border-radius:12px}.continue-teacher{display:grid;gap:9px}.continue-teacher .btn{width:100%}.login-divider{display:flex;align-items:center;gap:10px;color:#666;font-size:.72rem}.login-divider:before,.login-divider:after{content:"";height:1px;background:var(--line);flex:1}@media(min-width:640px){.app{padding:20px 20px 112px}.grid{grid-template-columns:repeat(2,1fr)}.card{padding:17px}}.student-list{display:grid;gap:0;padding-bottom:80px}.student-card{width:100%;min-height:52px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:10px;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:10px 4px;background:transparent;color:var(--text);text-align:left;user-select:none;cursor:pointer}.student-card:active{background:#ffffff08}.student-card:last-child{border-bottom:0}.student-card.locked{opacity:.82}.student-bullet{justify-self:center;color:#a0a0a0;font-size:1rem;line-height:1}.student-name{font-weight:760;min-width:0;line-height:1.25}.attendance-tag{font-size:.92rem;font-weight:900;padding:2px 0;border-radius:6px;width:34px;height:28px;display:grid;place-items:center;line-height:1;user-select:none;transition:background .12s,color .12s,border-color .12s}.attendance-tag.absent{background:#220e0e;color:var(--red);border:1px solid #481a1a}.attendance-tag.present{background:var(--greenbg);color:var(--green);border:1px solid #1c4827}.attendance-tag.excused{background:var(--yellowbg);color:var(--yellow);border:1px solid #4a3d16}.attendance-tag.locked{border:1px dashed #d97706;opacity:.9}.attendance-shell{min-height:100vh;padding-top:60px}.attendance-top{position:fixed;top:0;left:50%;transform:translate(-50%);width:min(720px,100%);z-index:70;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;min-height:50px;background:#000000f5;backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.attendance-title{flex:1;min-width:0}.attendance-title strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.92rem}.top-counts{display:flex;align-items:center;gap:4px;flex-shrink:0}.top-count{min-width:34px;padding:2px 5px;text-align:center;line-height:1}.top-count b{display:block;font-size:.95rem;font-weight:900}.top-count span{display:block;font-size:.6rem;color:var(--muted);margin-top:1px;font-weight:600}.top-count.present b{color:var(--green)}.top-count.absent b{color:var(--red)}.top-count.excused b{color:var(--yellow)}.name-toggle-btn{height:28px;padding:0 8px;border-radius:6px;font-size:.72rem;font-weight:800;letter-spacing:.04em;cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;transition:all .15s ease;border:1px solid var(--line2);background:var(--surface2);color:#777}.name-toggle-btn.active{background:#f3f3f3;color:#090909;border-color:#eee;box-shadow:0 0 10px #ffffff26}.name-toggle-btn:hover{filter:brightness(1.15)}.name-toggle-btn:active{transform:scale(.95)}.save-fab{position:fixed;right:max(18px,calc((100vw - 720px)/2 + 18px));bottom:18px;z-index:60;width:58px;height:58px;display:grid;place-items:center;border:1px solid #eee;border-radius:50%;background:#f5f5f5;color:#050505;box-shadow:0 10px 30px #0000007a;transition:opacity .2s,transform .2s}.save-fab.dimmed{opacity:.45;transform:scale(.92)}.save-fab svg{width:25px;height:25px;stroke-width:2.4}.attendance-search-bar{margin:6px 0 14px}.search-input-wrap{position:relative;display:flex;align-items:center}.search-icon-inline{position:absolute;left:12px;width:18px;height:18px;color:var(--muted);pointer-events:none;display:grid;place-items:center}.search-icon-inline svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.attendance-search-input{width:100%;min-height:42px!important;padding:9px 38px!important;font-size:.88rem;background:var(--surface2);border:1px solid var(--line2);border-radius:9px;color:var(--text);outline:none;transition:border-color .15s}.attendance-search-input:focus{border-color:var(--accent)}.search-clear-btn{position:absolute;right:8px;width:28px;height:28px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;border-radius:6px;padding:0}.search-clear-btn:hover,.search-clear-btn:active{color:var(--text);background:#ffffff14}.search-clear-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2}.empty-search-notice{text-align:center;padding:32px 16px;color:var(--muted);font-size:.9rem}@media(max-width:430px){.top-count{min-width:34px;padding:4px}}@media(min-width:640px){.attendance-top{margin:-20px -20px 12px;padding:11px 20px}}.history{display:grid;gap:7px}.history-day{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;margin:12px 2px 4px}.history-day-line{display:flex;align-items:center;gap:10px;min-width:0}.history-day-line:after{content:"";height:1px;background:var(--line);flex:1}.history-day-label{font-size:.76rem;font-weight:850;color:#a6a6aa;white-space:nowrap}.history-day-download{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:#929297;display:grid;place-items:center}.history-day-download:active{background:#141414}.history-day-download svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.history-item{border:1px solid var(--line);border-radius:9px;background:#080808;overflow:hidden}.history-item summary{list-style:none;cursor:pointer;padding:12px}.history-item summary::-webkit-details-marker{display:none}.history-item[open] summary{border-bottom:1px solid var(--line)}.history-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.history-summary-actions{display:flex;align-items:center;gap:4px}.history-controls{display:flex;justify-content:flex-end;margin:-5px 0 10px}.archive-toggle{border:0;background:transparent;color:var(--muted);padding:5px 2px;font-size:.75rem}.archive-tag{display:inline-flex;margin-left:6px;padding:2px 5px;border:1px solid var(--line2);border-radius:5px;color:var(--muted);font-size:.62rem;font-weight:850;vertical-align:1px}.archive-action{margin-top:10px}.summary-icon{width:34px;height:34px;border:0;background:transparent;transition:color .18s ease,background .18s ease,transform .18s ease}.summary-icon.copied{color:var(--green);background:#8ee6a81a;transform:scale(1.08)}.history-chevron{display:grid;place-items:center;width:26px;height:34px;color:#777;transition:transform .15s}.history-chevron svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.history-item[open] .history-chevron{transform:rotate(180deg)}.history-card-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:3px}.history-card-date{font-size:.76rem;font-weight:700;color:var(--muted);white-space:nowrap}.history-card-times{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.history-time-badge{display:inline-flex;align-items:center;padding:1px 5px;font-size:.7rem;font-weight:720;color:#aaa;background:#111;border:1px solid #242424;border-radius:5px;line-height:1.3;white-space:nowrap}.history-card-teacher{margin-left:auto;font-size:.72rem;color:#777;white-space:nowrap}.history-body{padding:5px 12px 12px}.history-grid{width:100%;margin-top:4px}.history-grid-row,.history-grid-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid #141414}.history-grid-header{border-bottom:1px solid var(--line);padding:4px 0 6px}.history-grid-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid #141414;margin-top:2px}.history-grid-name{font-size:.84rem;font-weight:720;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-grid-cols{display:flex;align-items:center;gap:6px}.history-group-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.history-col-actions{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.h-col-head{width:32px;text-align:center;font-size:.68rem;font-weight:800;color:var(--muted)}.h-cell{width:32px;height:26px;display:grid;place-items:center;font-size:.88rem;font-weight:900;border-radius:5px;user-select:none;line-height:1}.h-cell.present{color:var(--green);background:var(--greenbg);border:1px solid #1c4827}.h-cell.absent{color:var(--red);background:#220e0e;border:1px solid #481a1a}.h-cell.excused{color:var(--yellow);background:var(--yellowbg);border:1px solid #4a3d16}.h-cell.empty{color:#444}.h-cell.btn-cell{cursor:pointer;border:1px dashed var(--line2)}.h-download-btn{width:32px;height:28px;color:var(--muted);padding:0;display:grid;place-items:center;transition:color .18s,transform .18s}.h-download-btn svg{width:15px;height:15px}.h-download-btn:hover{color:#fff}.h-download-btn.copied{color:var(--green);transform:scale(1.12)}.class-inline-input{width:100%;min-height:38px;padding:6px 9px;border:1px solid var(--accent);border-radius:8px;background:var(--surface2);color:#fff;font-weight:760}.history-tool{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:var(--muted);display:grid;place-items:center;transition:color .18s,transform .18s}.history-tool svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.history-tool:hover{color:#fff}.history-tool.copied{color:var(--green);transform:scale(1.1)}.history-tool.active{background:#161616;color:#eee}.history-tool.archive{color:#999}.history-save{width:34px;height:34px;border:0;border-radius:9px;background:#f2f2f2;color:#080808;display:grid;place-items:center}.history-save svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.history-save.hidden{display:none}.undo-confirm{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:9px;align-items:center}.list-card{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#080808;transition:background .15s ease,border-color .15s ease}.list-card.clickable{cursor:pointer}.list-card.clickable:hover,.list-card.clickable:active{background:var(--surface2);border-color:var(--line2)}.pin{font-size:1.85rem;font-weight:900;letter-spacing:.14em}.pin-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}.pin-actions{display:flex;gap:4px;align-items:center}.pin-actions .icon-btn{width:36px;height:36px;border-color:transparent;background:transparent}.manual-add{display:grid;grid-template-columns:1fr 1fr 44px;gap:7px}.manual-add .icon-btn{height:48px;width:44px;font-size:1.35rem}.file-help{display:grid;gap:9px;padding:11px;border:1px solid var(--line);border-radius:9px;background:#070707}.file-picker-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.file-picker{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:8px 11px;border:1px solid var(--line2);border-radius:8px;background:#151515;color:#eee;font-weight:760;cursor:pointer;white-space:nowrap}.file-picker svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.example-sheet{width:100%;max-width:280px;margin-inline:auto;border:1px solid var(--line2);border-radius:7px;overflow:hidden;background:#0d0d0d;font-size:.74rem}.example-sheet div{display:grid;grid-template-columns:1fr 1fr}.example-sheet b,.example-sheet span{padding:5px 7px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.example-sheet b:nth-child(2n),.example-sheet span:nth-child(2n){border-right:0}.example-sheet .last span{border-bottom:0}.preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#090909;border:1px solid var(--line);border-radius:9px}.mode-toggle button{min-height:38px;border:0;border-radius:6px;background:transparent;color:#888;font-weight:780}.mode-toggle button.active{background:#ededed;color:#080808}.plain-section{padding:2px 0 12px;border-bottom:1px solid var(--line)}.plain-section:last-child{border-bottom:0;padding-bottom:0}details.admin-drop{border-bottom:1px solid var(--line)}details.admin-drop:last-child{border-bottom:0}details.admin-drop summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:11px 0;cursor:pointer;font-weight:820}details.admin-drop summary::-webkit-details-marker{display:none}details.admin-drop summary:after{content:"⌄";color:#777;font-size:1rem;transition:.12s}details.admin-drop[open] summary:after{transform:rotate(180deg)}.drop-body{padding:2px 0 14px}.class-admin-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}.class-admin-row:last-child{border-bottom:0}.class-admin-actions{display:flex;gap:4px;align-items:center}.class-admin-actions .icon-btn{width:36px;height:36px;border-color:transparent;background:transparent}.class-inline-editor{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;padding:3px 0 6px}.class-inline-confirm{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0 7px}.class-inline-buttons{display:flex;gap:5px;align-items:center}.class-inline-buttons .icon-btn{width:36px;height:36px}@media(max-width:430px){.manual-add{grid-template-columns:1fr 1fr}.manual-add .icon-btn{grid-column:1 / -1;width:100%}}
