﻿:root{
  --primary:#5d5bd4;--primary-dark:#4543b8;--primary-soft:#f0efff;
  --accent:#ffb84d;--bg:#f5f7fb;--card:#fff;--text:#1f2937;--muted:#6b7280;
  --line:#e5e7eb;--line2:#eef0f4;--danger:#c83e52;--danger-soft:#fff0f2;
  --ok:#15825f;--ok-soft:#e9f7f1;--warn:#b56d05;--warn-soft:#fff5df;
  --sidebar:#20233a;--sidebar2:#292d49;--shadow:0 10px 32px rgba(30,41,59,.07);
  --radius:14px;--radius-lg:20px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}button,input,select,textarea{font:inherit}button{cursor:pointer}

/* Shared */
.brand{display:flex;align-items:center;gap:9px;color:var(--text);text-decoration:none;font-weight:800;font-size:20px}.brand.compact{font-size:17px}.brandmark{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#fff;overflow:hidden;box-shadow:0 5px 14px rgba(30,41,59,.12);flex:0 0 auto}.brandmark img{width:100%;height:100%;display:block;object-fit:contain}
.topbar{height:62px;position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px}.user{display:flex;gap:12px;align-items:center;font-size:13px;color:var(--muted)}.user a{color:var(--primary);text-decoration:none;font-weight:700}.page{max-width:1180px;margin:0 auto;padding:20px}
.hero{background:linear-gradient(145deg,var(--primary),#8275e8);color:#fff;border-radius:20px;padding:20px;margin-bottom:16px;box-shadow:0 12px 28px rgba(93,91,212,.18)}.hero h1{font-size:24px;margin:0 0 5px}.hero p{margin:0;opacity:.9}
.grid{display:grid;gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:0 4px 14px rgba(37,48,74,.035)}.card h2,.card h3{margin:0 0 10px}.metric b{font-size:26px;display:block}.muted{color:var(--muted)}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:20px 2px 10px}.section-title h2{margin:0;font-size:18px}.section-title .section-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;border:1px solid #dddff0;border-radius:10px;padding:9px 13px;text-decoration:none;cursor:pointer;font-weight:700;background:#f7f7fc;color:#4c4c7c}.btn:hover{background:#f0efff}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}.btn.danger{background:var(--danger-soft);border-color:#ffd6dd;color:var(--danger)}.btn.ok{background:var(--ok-soft);border-color:#d4eee4;color:var(--ok)}.btn.sm{padding:6px 9px;border-radius:8px;font-size:12px}.btn.icon-only{width:36px;height:36px;padding:0}.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.inline{display:inline-flex;margin:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:12px;font-weight:750;color:#596174}.field .hint{font-size:11px;color:var(--muted)}input,select,textarea{width:100%;border:1px solid #dfe2e9;border-radius:10px;background:#fff;padding:10px 11px;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:#aaa7ed;box-shadow:0 0 0 3px rgba(93,91,212,.09)}textarea{min-height:92px;resize:vertical}input[readonly]{background:#f7f8fa;color:#6b7280}
.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px}.data-table{width:100%;border-collapse:collapse;min-width:720px}table{width:100%;border-collapse:collapse;min-width:680px}th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line2);font-size:13px;vertical-align:middle}th{color:#697386;font-size:11px;text-transform:uppercase;letter-spacing:.035em;background:#fafbfc;white-space:nowrap}tbody tr:last-child td{border-bottom:0}.row-link{font-weight:800;color:#333565;text-decoration:none}.row-link:hover{color:var(--primary);text-decoration:underline}
.badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;background:#eef0f5;color:#586173}.badge.ok{background:var(--ok-soft);color:var(--ok)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.danger{background:var(--danger-soft);color:var(--danger)}.badge.primary{background:var(--primary-soft);color:var(--primary-dark)}
.list{display:flex;flex-direction:column;gap:9px}.list-item{display:flex;gap:11px;padding:13px;background:#fff;border:1px solid var(--line);border-radius:13px;text-decoration:none;color:inherit}.list-item:hover{border-color:#d6d4f5}.dot{width:9px;height:9px;margin-top:5px;border-radius:50%;background:var(--primary);flex:0 0 auto}.list-item.read{opacity:.67}.list-item .grow{flex:1;min-width:0}.list-item h3{font-size:14px;margin:0 0 4px}.list-item p{font-size:12px;margin:0;color:var(--muted);line-height:1.45}.empty{padding:28px;text-align:center;color:var(--muted)}.alert{padding:12px 14px;border-radius:10px;margin-bottom:12px;background:var(--warn-soft);color:#7a5000;border:1px solid #f8e3b7}
.tabs{display:flex;gap:8px;overflow:auto;margin-bottom:12px}.tabs a{white-space:nowrap;padding:8px 11px;border-radius:999px;text-decoration:none;background:#eceef4;color:#596171;font-size:12px}.tabs a.active{background:var(--primary);color:#fff}
.bottomnav{position:fixed;bottom:0;left:0;right:0;height:68px;background:#fff;border-top:1px solid var(--line);display:flex;z-index:30;padding-bottom:env(safe-area-inset-bottom)}.bottomnav a{flex:1;text-align:center;text-decoration:none;color:#758095;font-size:10px;padding:7px 2px}.bottomnav b{display:block;color:var(--primary);font-size:20px;line-height:26px}
.unread-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--danger);color:#fff;font-size:11px;font-weight:800}

/* Login */
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(420px,.75fr);background:#f8f9fc}.login-visual{position:relative;min-height:100vh;overflow:hidden;background:linear-gradient(150deg,#5857cf 0%,#7770e7 48%,#9e91f1 100%);display:flex;align-items:flex-end;padding:64px}.login-visual:after{content:"";position:absolute;width:440px;height:440px;border-radius:50%;background:rgba(255,255,255,.09);right:-120px;top:-110px}.login-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.92}.login-message{position:relative;z-index:2;color:#fff;max-width:620px;text-shadow:0 2px 16px rgba(26,25,91,.2)}.login-message h2{font-size:42px;line-height:1.12;margin:0 0 14px;letter-spacing:-.02em}.login-message p{font-size:17px;line-height:1.6;margin:0;max-width:540px;opacity:.94}.login-panel{display:grid;place-items:center;padding:34px;background:#fff}.login-card{width:min(390px,100%);padding:12px}
.login-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    background: #fff;
    display: grid;
    place-items: center;
    margin: 0 auto 16px auto;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(30,41,59,.10);
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           .login-logo img{width:100%;height:100%;display:block;object-fit:contain}.login-card h1{font-size:28px;margin:0 0 6px}.login-subtitle{margin:0 0 24px;color:var(--muted);line-height:1.5}.login-card .field{margin:13px 0}.login-card .btn{width:100%;min-height:44px;margin-top:6px}.login-footnote{font-size:11px;color:#9aa0aa;margin-top:20px}

/* Teacher shell */
.role-teacher{background:#f5f6fa}.teacher-shell{min-height:100vh;display:grid;grid-template-columns:270px minmax(0,1fr)}.teacher-sidebar{position:fixed;inset:0 auto 0 0;width:270px;background:linear-gradient(180deg,var(--sidebar),#1c1f33);color:#f8fafc;padding:24px 16px 18px;display:flex;flex-direction:column;z-index:50;box-shadow:8px 0 24px rgba(24,27,48,.08)}.teacher-main{grid-column:2;min-width:0}.sidebar-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-size:19px;font-weight:850;padding:0 5px 18px}.sidebar-brand img{width:42px;height:42px;border-radius:11px;object-fit:contain;background:#fff}.teacher-page{padding:22px 26px 34px;max-width:1500px;margin:0 auto}.teacher-mobilebar{display:none}.teacher-profile{display:flex;align-items:center;gap:12px;padding:4px 5px 22px;border-bottom:1px solid rgba(255,255,255,.09)}.teacher-avatar{width:56px;height:56px;border-radius:17px;background:#fff;object-fit:cover;box-shadow:0 8px 20px rgba(0,0,0,.15)}.teacher-profile-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.teacher-profile-copy strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.teacher-profile-copy span{font-size:12px;color:#aeb4ca}.sidebar-section-title{font-size:10px;letter-spacing:.11em;color:#8f97b2;font-weight:800;padding:22px 8px 9px}.class-menu{display:flex;flex-direction:column;gap:6px}.class-menu-item{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:7px;text-decoration:none;color:#d8dced;padding:10px 10px;border-radius:10px;font-size:13px}.class-menu-item:hover{background:rgba(255,255,255,.07)}.class-menu-item.active{background:#fff;color:#252746;box-shadow:0 8px 22px rgba(0,0,0,.12)}.class-menu-item .class-year{font-size:11px}.class-menu-item .class-arrow{opacity:.7}.class-menu-item strong{font-size:14px}.class-history{font-size:9px;padding:3px 5px;border-radius:999px;background:rgba(255,255,255,.1)}.class-menu-item.active .class-history{background:#eeeff7;color:#6d7286}.sidebar-empty{font-size:12px;color:#9ba2b7;padding:10px}.sidebar-spacer{flex:1}.sidebar-links{display:flex;flex-direction:column;gap:5px;border-top:1px solid rgba(255,255,255,.09);padding-top:12px}.sidebar-links a{display:flex;align-items:center;gap:9px;color:#c5cada;text-decoration:none;padding:9px 10px;border-radius:9px;font-size:12px}.sidebar-links a:hover{background:rgba(255,255,255,.07)}
.class-header{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px 22px 0;box-shadow:var(--shadow);margin-bottom:14px}.class-header-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding-bottom:18px}.class-title-wrap h1{margin:0 0 5px;font-size:25px;letter-spacing:-.015em}.class-title-wrap p{margin:0;color:var(--muted);font-size:13px}.class-meta{display:flex;flex-wrap:wrap;gap:9px 18px;margin-top:12px}.class-meta span{font-size:12px;color:#667085}.class-meta b{color:#30364a}.class-header-actions{display:flex;gap:8px;flex-wrap:wrap}.class-tabs{display:flex;gap:3px;overflow:auto;border-top:1px solid var(--line2);padding-top:2px}.class-tab{border:0;background:transparent;white-space:nowrap;padding:13px 11px 12px;color:#697386;font-size:12px;font-weight:750;border-bottom:2px solid transparent}.class-tab:hover{color:var(--primary)}.class-tab.active{color:var(--primary-dark);border-bottom-color:var(--primary);background:linear-gradient(180deg,transparent,#f8f7ff)}
.workspace-panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:18px;min-height:280px}.workspace-loading{display:grid;place-items:center;min-height:240px;color:var(--muted);font-size:13px}.workspace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.workspace-toolbar h2{font-size:17px;margin:0}.workspace-toolbar-left,.workspace-toolbar-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.workspace-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 14px}.workspace-filters input,.workspace-filters select{width:auto;min-width:150px;padding:8px 10px}.group-block{border:1px solid var(--line2);border-radius:12px;margin-bottom:12px;overflow:hidden}.group-title{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#fafbfc;font-size:12px;font-weight:800;color:#555d70}.group-block table{min-width:650px}.student-count{font-size:12px;color:var(--muted)}.soft-note{font-size:11px;color:#8b93a4;margin-top:10px}

/* Modal / toast */
.modal-backdrop{position:fixed;inset:0;background:rgba(20,23,38,.56);display:none;align-items:center;justify-content:center;padding:18px;z-index:1000}.modal-backdrop.open{display:flex}.modal-card{width:min(760px,100%);max-height:min(88vh,900px);background:#fff;border-radius:16px;box-shadow:0 28px 90px rgba(13,17,34,.28);overflow:hidden;display:flex;flex-direction:column}.modal-card.wide{width:min(960px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font-size:17px}.modal-close{width:34px;height:34px;border:0;border-radius:9px;background:#f4f5f7;font-size:20px;color:#666}.modal-body{padding:18px;overflow:auto}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:13px 18px;border-top:1px solid var(--line);background:#fafbfc}.target-box{border:1px solid var(--line);border-radius:11px;padding:12px;background:#fbfcfd}.target-options{display:flex;gap:16px;align-items:center;margin-bottom:10px}.check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;max-height:210px;overflow:auto;padding:7px;border-top:1px solid var(--line2)}.check-item{display:flex;align-items:center;gap:7px;padding:6px 7px;border-radius:8px;font-size:12px}.check-item:hover{background:#f6f7fb}.check-item input{width:auto}.toast-stack{position:fixed;right:20px;top:20px;z-index:1300;display:flex;flex-direction:column;gap:8px}.toast{min-width:250px;max-width:420px;background:#222638;color:#fff;padding:12px 14px;border-radius:11px;box-shadow:0 14px 34px rgba(0,0,0,.18);font-size:13px}.toast.ok{background:#176c52}.toast.error{background:#a93448}

/* Student detail */
.student-header{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:var(--shadow);margin-bottom:14px}.student-header-main{display:flex;gap:16px;align-items:center}.student-photo{width:70px;height:70px;border-radius:18px;background:#f1f2f7;object-fit:cover}.student-head-copy{flex:1}.student-head-copy h1{margin:0 0 4px;font-size:23px}.student-head-copy p{margin:0;color:var(--muted);font-size:13px}.student-breadcrumb{font-size:12px;color:var(--primary);text-decoration:none;font-weight:750;margin-bottom:10px;display:inline-block}.student-tabs{display:flex;gap:4px;overflow:auto;margin-top:17px;border-top:1px solid var(--line2);padding-top:3px}.student-tab{border:0;background:transparent;padding:11px 10px;white-space:nowrap;color:#6f7789;font-size:12px;font-weight:750;border-bottom:2px solid transparent}.student-tab.active{color:var(--primary-dark);border-color:var(--primary)}

/* Parent app */
.role-parent{background:#f3f5f9;padding-bottom:78px}.parent-app-shell{min-height:100vh}.app-topbar{height:60px;position:sticky;top:0;z-index:30;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 16px}.app-top-actions{display:flex;gap:6px}.app-icon-link{position:relative;width:36px;height:36px;display:grid;place-items:center;text-decoration:none;border-radius:10px;background:#f6f7fa}.app-notification-badge{position:absolute;right:-3px;top:-3px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--danger);color:#fff;font-size:9px;font-weight:900;display:grid;place-items:center}.app-page{max-width:740px;margin:0 auto;padding:14px 14px 26px}.app-bottomnav{position:fixed;left:0;right:0;bottom:0;height:66px;background:#fff;border-top:1px solid var(--line);display:flex;z-index:50;padding-bottom:env(safe-area-inset-bottom)}.app-bottomnav a{flex:1;text-decoration:none;text-align:center;color:#7b8494;font-size:9px;padding:6px 2px}.app-bottomnav b{display:block;font-size:19px;line-height:27px;color:#5f6472}.app-bottomnav a:hover,.app-bottomnav a:focus{color:var(--primary)}.app-bottomnav a:hover b,.app-bottomnav a:focus b{color:var(--primary)}
.student-app-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#5d5bd4,#8176e7);color:#fff;border-radius:20px;padding:18px;box-shadow:0 14px 30px rgba(73,70,180,.23)}.student-app-card:after{content:"";position:absolute;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.09);right:-38px;top:-45px}.student-app-main{position:relative;z-index:2;display:flex;align-items:center;gap:13px}.student-app-avatar{width:66px;height:66px;border-radius:18px;background:#fff;object-fit:cover;border:2px solid rgba(255,255,255,.7)}.student-app-copy h1{font-size:21px;margin:0 0 4px}.student-app-copy p{margin:2px 0;font-size:12px;opacity:.91}.student-app-meta{position:relative;z-index:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.18)}.student-app-meta span{font-size:11px;opacity:.92}.student-app-meta b{display:block;font-size:12px;margin-top:2px}
.app-section{margin-top:18px}.app-section-head{display:flex;align-items:center;justify-content:space-between;margin:0 2px 9px}.app-section-head h2{margin:0;font-size:16px}.app-section-head a{font-size:11px;color:var(--primary);font-weight:750;text-decoration:none}.activity-feed{display:flex;flex-direction:column;gap:7px}.activity-item{display:flex;gap:10px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:13px;text-decoration:none}.activity-icon{width:34px;height:34px;border-radius:10px;background:var(--primary-soft);display:grid;place-items:center;flex:0 0 auto}.activity-copy{flex:1;min-width:0}.activity-copy h3{font-size:13px;margin:0 0 3px}.activity-copy p{font-size:11px;color:var(--muted);margin:0;line-height:1.4}.activity-new{width:7px;height:7px;border-radius:50%;background:var(--danger);margin-top:7px}.app-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.app-grid-item{background:#fff;border:1px solid var(--line);border-radius:14px;min-height:92px;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:10px 5px;text-align:center;box-shadow:0 4px 12px rgba(37,48,74,.025)}.app-grid-icon{width:38px;height:38px;border-radius:12px;background:#f2f1ff;color:var(--primary-dark);display:grid;place-items:center;font-size:18px}.app-grid-item span:last-child{font-size:10.5px;font-weight:750;color:#555d70;line-height:1.2}.app-list-page-head{display:flex;align-items:center;gap:9px;margin:2px 0 14px}.app-back{width:34px;height:34px;border-radius:10px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;text-decoration:none}.app-list-page-head h1{margin:0;font-size:20px}

/* Print */
.print-card{border:1px dashed #777;padding:16px;border-radius:12px;break-inside:avoid}.qr{width:120px;height:120px;object-fit:contain}

@media(max-width:1080px){.teacher-shell{grid-template-columns:230px minmax(0,1fr)}.teacher-sidebar{width:230px}.teacher-page{padding:18px}.app-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){
  .login-shell{grid-template-columns:1fr}.login-visual{display:none}.login-panel{min-height:100vh;padding:22px}.login-card{padding:0}
  .teacher-shell{display:block}.teacher-sidebar{transform:translateX(-102%);transition:transform .2s ease;width:min(84vw,290px)}.teacher-sidebar.open{transform:translateX(0)}.teacher-main{display:block}.teacher-mobilebar{height:58px;display:flex;position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid var(--line);align-items:center;gap:11px;padding:0 12px}.teacher-mobile-name{margin-left:auto;font-size:11px;color:var(--muted);max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-btn{width:36px;height:36px;border:0;border-radius:10px;background:#f2f3f7;color:#34384d}.teacher-page{padding:12px}.class-header{padding:15px 14px 0}.class-header-top{flex-direction:column}.class-header-actions{width:100%}.class-title-wrap h1{font-size:21px}.class-meta{gap:7px 12px}.workspace-panel{padding:12px}.workspace-toolbar{align-items:flex-start;flex-direction:column}.workspace-toolbar-right{width:100%}.workspace-filters{align-items:stretch}.workspace-filters input,.workspace-filters select{width:100%;min-width:0}.check-list{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.grid.two,.grid.three{grid-template-columns:1fr}.page{padding:12px}
  .table-wrap.mobile-cards{overflow:visible;background:transparent;border:0}.mobile-cards table,.mobile-cards thead,.mobile-cards tbody,.mobile-cards th,.mobile-cards td,.mobile-cards tr{display:block;min-width:0}.mobile-cards thead{display:none}.mobile-cards tr{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:8px;padding:8px}.mobile-cards td{border:0;padding:6px 7px}.mobile-cards td:before{content:attr(data-label);display:block;font-size:9px;color:var(--muted);font-weight:800;text-transform:uppercase;margin-bottom:2px}.mobile-cards td.actions-cell:before{display:none}
  .modal-card{max-height:94vh;border-radius:14px}.modal-body{padding:14px}.modal-foot{padding:11px 14px}
}
@media(max-width:560px){.app-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.app-grid-item{min-height:88px}.student-app-meta{grid-template-columns:1fr 1fr}.role-parent .hero{border-radius:16px}.app-page{padding:12px 12px 24px}.print-grid{grid-template-columns:1fr}}
@media(max-width:390px){.app-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.app-grid-item{min-height:82px;padding:8px 3px}.app-grid-icon{width:35px;height:35px}}
@media print{.topbar,.bottomnav,.teacher-sidebar,.teacher-mobilebar,.app-topbar,.app-bottomnav,.no-print{display:none!important}body{padding:0;background:#fff}.page,.teacher-page,.app-page{max-width:none;padding:0}.teacher-main{margin:0}.print-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.print-card{page-break-inside:avoid}}

/* 2026-09-08 parent app refinements */
.child-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#5d5bd4,#7c72e4);color:#fff;border-radius:22px;padding:18px;box-shadow:0 15px 34px rgba(73,70,180,.22)}
.child-card:after{content:"";position:absolute;width:170px;height:170px;border-radius:50%;right:-65px;top:-70px;background:rgba(255,255,255,.09)}
.child-card-main{position:relative;z-index:2;display:flex;align-items:center;gap:14px}.child-avatar{width:70px;height:70px;border-radius:20px;background:#fff;border:2px solid rgba(255,255,255,.68);object-fit:cover}.child-card-copy{min-width:0}.child-card-kicker{font-size:10px;font-weight:800;opacity:.82;letter-spacing:.03em}.child-card-copy h1{font-size:23px;margin:4px 0 5px}.child-card-copy p{font-size:12px;margin:0;opacity:.92}.child-card-meta{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:15px;padding-top:12px;border-top:1px solid rgba(255,255,255,.18)}.child-card-meta span{font-size:12px;line-height:1.35}.child-card-meta b{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.06em;opacity:.72;margin-bottom:3px}.eyebrow{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#9298a8;margin-bottom:2px}.text-link{font-size:11px;color:var(--primary);font-weight:800;text-decoration:none}
.activity-item.is-read{opacity:.7}.activity-copy .activity-line{display:flex;align-items:center;gap:7px}.activity-copy .activity-line strong{font-size:13px;line-height:1.35}.activity-copy time{display:block;margin-top:5px;color:#9aa0ac;font-size:10px}.mini-new{font-size:8px;font-weight:900;color:#fff;background:var(--danger);border-radius:999px;padding:2px 6px}.activity-empty{padding:22px;text-align:center;color:var(--muted);font-size:12px;background:#fff;border:1px solid var(--line);border-radius:13px}
.parent-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.feature-tile{min-height:108px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 8px;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:0 4px 14px rgba(37,48,74,.025)}.feature-tile:hover{border-color:#cfccf7;transform:translateY(-1px)}.feature-icon{width:41px;height:41px;border-radius:13px;background:var(--primary-soft);color:var(--primary-dark);display:grid;place-items:center;font-size:19px;margin-bottom:7px}.feature-tile strong{font-size:11.5px;color:#3e4555}.feature-tile small{font-size:9px;color:#949baa;margin-top:3px;line-height:1.25}.feature-accent .feature-icon{background:#fff1dc;color:#b36b00}
.app-page-title{display:flex;align-items:flex-start;gap:10px;margin:4px 0 14px}.app-page-title h1{font-size:21px;margin:0 0 3px}.app-page-title p{font-size:11px;color:var(--muted);margin:0;line-height:1.45}.back-link{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 8px;border-radius:10px;background:#fff;border:1px solid var(--line);color:var(--primary-dark);text-decoration:none;font-size:12px;font-weight:800}.simple-page-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:16px}.simple-page-head h1{font-size:24px;margin:8px 0 4px}.simple-page-head p{margin:0;color:var(--muted);font-size:13px}.app-action-row{display:flex;justify-content:flex-end;margin-bottom:10px}.profile-card{max-width:650px}.form-note{font-size:11px;color:var(--muted);line-height:1.5}.full-button{width:100%;margin-top:8px}
.feedback-list{display:flex;flex-direction:column;gap:9px}.feedback-card{padding:14px}.feedback-card p{font-size:12px;line-height:1.55;white-space:pre-wrap}.feedback-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.feedback-head>div{display:flex;flex-direction:column;gap:3px}.feedback-head strong{font-size:14px}.feedback-head small{font-size:10px;color:var(--muted)}.teacher-reply{margin-top:12px;padding:11px 12px;border-radius:11px;background:#f4f3ff;border-left:3px solid var(--primary)}.teacher-reply span{font-size:10px;font-weight:900;color:var(--primary-dark)}.teacher-reply p{margin:5px 0}.teacher-reply small{font-size:9px;color:var(--muted)}.compact-tabs{margin-bottom:12px}.police-item{align-items:center}.police-item.mine{border-color:#c8e9dc;background:#fbfffd}.date-tile{width:50px;height:52px;border-radius:12px;background:#f2f1ff;color:var(--primary-dark);display:flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 auto}.date-tile b{font-size:18px;line-height:18px}.date-tile small{font-size:8px;margin-top:3px}
.print-actions{margin-bottom:14px}.credential-card{border:1px solid #d8dbe4;border-radius:16px;padding:17px}.credential-brand{display:flex;align-items:center;gap:9px;padding-bottom:10px;border-bottom:1px solid #eceef3}.credential-brand h2{font-size:18px;margin:0}.credential-brand small{font-size:9px;color:#8b92a2}.credential-person{display:flex;flex-direction:column;gap:3px;padding:12px 0}.credential-person span,.credential-login span{font-size:9px;text-transform:uppercase;color:#8b92a2;font-weight:800}.credential-person strong{font-size:16px}.credential-person small{font-size:11px;color:#60697a}.credential-login{display:grid;grid-template-columns:1fr 1fr;gap:9px}.credential-login>div{background:#f7f8fb;border:1px solid #e8eaf0;border-radius:10px;padding:9px}.credential-login strong{display:block;margin-top:3px;font-size:15px}.temp-password{font-size:20px!important;letter-spacing:.06em}.credential-qr{display:flex;align-items:center;gap:13px;margin-top:12px}.credential-qr p{font-size:10px;line-height:1.45;color:#61697a;margin:0}.credential-note{font-size:9px;color:#858c9a;margin:9px 0 0;line-height:1.45}

@media(max-width:560px){.child-card-meta{grid-template-columns:repeat(3,minmax(0,1fr))}.parent-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.feature-tile{min-height:100px}.simple-page-head h1{font-size:21px}}
@media(max-width:390px){.parent-feature-grid{gap:7px}.feature-tile{min-height:94px;padding:9px 4px}.feature-tile small{display:none}.child-card-meta{gap:5px}.child-card-meta span{font-size:10px}}

/* 2026-09-08 server-rendered workspace refinements */
.class-tabs-links{background:#fff;border:1px solid var(--line);border-radius:14px;padding:2px 10px 0;margin:-2px 0 14px;box-shadow:var(--shadow);display:flex;gap:3px;overflow-x:auto;overflow-y:hidden}
.class-tab-link{display:block;white-space:nowrap;padding:13px 10px 11px;color:#697386;font-size:12px;font-weight:750;text-decoration:none;border-bottom:2px solid transparent}
.class-tab-link:hover{color:var(--primary)}.class-tab-link.active{color:var(--primary-dark);border-bottom-color:var(--primary);background:linear-gradient(180deg,transparent,#f8f7ff)}
.student-tab{text-decoration:none;display:block}.student-tab:hover{color:var(--primary)}
.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.detail-grid>div{border:1px solid var(--line2);background:#fafbfc;border-radius:11px;padding:11px 12px;display:flex;flex-direction:column;gap:4px}.detail-grid span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.detail-grid b{font-size:13px;color:#30364a}
.workspace-note{margin-top:11px;padding:10px 12px;border-radius:10px;background:#f8f7ff;color:#656b7d;font-size:11px}.workspace-note a{font-weight:800;color:var(--primary);text-decoration:none}
.row-subtext{font-size:11px;color:var(--muted);margin-top:3px;max-width:620px;white-space:normal;line-height:1.4}.list-stack{display:flex;flex-direction:column;gap:7px}.list-row{display:flex;justify-content:space-between;gap:16px;border:1px solid var(--line2);border-radius:11px;padding:11px 12px;background:#fff}.list-row b{font-size:13px}.list-row p{font-size:11px;color:var(--muted);margin:4px 0 0;white-space:pre-wrap}.list-row small{font-size:10px;color:var(--muted);white-space:nowrap}.checkbox-field{justify-content:flex-end}.checkbox-field label{display:flex;align-items:center;gap:8px;margin-top:25px}.checkbox-field input{width:auto}
body.modal-open{overflow:hidden}
@media(max-width:780px){.detail-grid{grid-template-columns:1fr 1fr}.student-header-main{align-items:flex-start;flex-wrap:wrap}.student-head-copy{min-width:180px}.student-header-main>.btn{width:100%}.class-tabs-links{border-radius:11px;padding-left:5px;padding-right:5px}.list-row{flex-direction:column;gap:6px}.list-row small{white-space:normal}}
@media(max-width:480px){.detail-grid{grid-template-columns:1fr}.student-photo{width:58px;height:58px}.student-head-copy h1{font-size:20px}}

/* Optimized weekly schedule */
.schedule-hint{font-size:12px;color:var(--muted);margin-top:3px}.schedule-grid-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:#fff;margin-top:8px}.schedule-grid{width:100%;min-width:880px;border-collapse:separate;border-spacing:0;table-layout:fixed}.schedule-grid th,.schedule-grid td{border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);padding:0;text-align:center}.schedule-grid tr:last-child th,.schedule-grid tr:last-child td{border-bottom:0}.schedule-grid th:last-child,.schedule-grid td:last-child{border-right:0}.schedule-grid thead th{background:#f7f8fb;padding:10px 8px;text-transform:none;letter-spacing:0}.schedule-day-head,.schedule-day{width:90px}.schedule-day{background:#fbfbfd!important;color:#3c4358!important;font-size:12px!important;font-weight:850!important;padding:12px 8px!important}.period-head{display:flex;flex-direction:column;gap:3px}.period-head strong{font-size:12px;color:#34384b}.period-head span{font-size:10px;color:#7d8596;font-weight:500}.schedule-cell{height:88px;background:#fff}.schedule-cell.is-empty{background:#fcfcfd}.schedule-subject{height:100%;min-height:88px;padding:10px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#303958;text-decoration:none;transition:.15s background,.15s color}.schedule-subject:hover{background:#f3f6ff;color:var(--primary-dark)}.schedule-subject strong{font-size:12px;line-height:1.25}.schedule-subject span{font-size:10px;color:#8a91a0}.schedule-empty-mark{color:#d5d8e0}.schedule-subjects-head{display:flex;justify-content:space-between;align-items:end;margin:22px 0 10px}.schedule-subjects-head>div{display:flex;align-items:baseline;gap:8px}.schedule-subjects-head h3{margin:0;font-size:15px}.schedule-subjects-head span{font-size:11px;color:var(--muted)}.subject-chip-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.subject-chip{border:1px solid var(--line2);border-radius:11px;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff}.subject-chip-main{min-width:0}.subject-chip-main strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subject-chip-main span{display:block;font-size:10px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subject-chip-actions{display:flex;gap:7px;align-items:center;white-space:nowrap}.subject-chip-actions a,.link-danger{border:0;background:none;padding:0;font-size:10px;color:var(--primary);text-decoration:none;cursor:pointer}.link-danger{color:#c73939}.empty-state{border:1px dashed var(--line);border-radius:12px;padding:28px;text-align:center;color:var(--muted);font-size:13px;background:#fcfcfd}
@media(max-width:900px){.subject-chip-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.schedule-workspace{padding:10px}.schedule-grid{min-width:760px}.schedule-day-head,.schedule-day{width:72px}.schedule-cell,.schedule-subject{height:76px;min-height:76px}.subject-chip-list{grid-template-columns:1fr}.schedule-subjects-head{margin-top:16px}}

/* Parent schedule day filter */
.schedule-day-switch{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:4px 0 14px}
.schedule-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:58px;padding:8px 4px;background:#fff;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:var(--text);transition:.15s ease}
.schedule-day span{font-size:15px;font-weight:900}.schedule-day small{font-size:9px;color:var(--muted);font-weight:700}
.schedule-day:hover{border-color:#c7cae7;background:#f8f8ff}.schedule-day.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 5px 14px rgba(51,53,101,.16)}
.schedule-day.active small{color:rgba(255,255,255,.78)}
.schedule-selected-title{font-size:13px;color:var(--muted);margin:0 0 8px}.schedule-selected-title b{color:var(--text)}
.parent-schedule-list{display:flex;flex-direction:column;gap:8px}
.parent-schedule-item{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 12px}
.schedule-period-no{width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#f1f2fb;color:var(--primary);font-weight:900;display:flex;align-items:center;justify-content:center}
.schedule-main{min-width:0;flex:1}.schedule-subject{font-size:14px;font-weight:850;color:var(--text)}
.schedule-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:3px;font-size:10px;color:var(--muted)}
.schedule-teacher{max-width:34%;font-size:10px;color:var(--muted);text-align:right}
.compact-empty{padding:24px 16px}
@media(max-width:600px){.schedule-day-switch{gap:6px}.schedule-day{min-height:52px;border-radius:10px}.schedule-day span{font-size:14px}.schedule-day small{display:none}.parent-schedule-item{padding:10px}.schedule-teacher{display:none}}

/* Parent - Information / announcements */
.info-section{margin-top:18px}.info-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:10px}.info-section-kicker{display:block;font-size:9px;letter-spacing:.12em;font-weight:900;color:var(--primary);margin-bottom:3px}.info-section-head h2{margin:0;font-size:16px}.info-count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:25px;padding:0 7px;border-radius:999px;background:var(--primary);color:#fff;font-size:11px;font-weight:800}.today-info-card{display:block;background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px 16px;margin-bottom:9px;color:inherit;text-decoration:none;box-shadow:0 4px 14px rgba(26,34,54,.035)}.today-info-card:active{transform:scale(.995)}.today-info-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.info-time,.info-meta{font-size:10px;color:var(--primary);font-weight:800}.today-info-card h3{font-size:15px;margin:0 0 6px;line-height:1.35}.today-info-card p{font-size:12px;line-height:1.55;color:#626a79;margin:0;white-space:pre-wrap}.info-important{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;background:#fff0ef;color:#bd3d35;font-size:9px;font-weight:900;margin-right:6px}.info-history-section{margin-top:26px}.info-history-list{background:#fff;border:1px solid var(--line);border-radius:15px;overflow:hidden}.info-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto 12px;align-items:center;gap:9px;padding:13px 14px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line2)}.info-history-item:last-child{border-bottom:0}.info-history-main{min-width:0}.info-history-title{display:flex;align-items:center;gap:6px;min-width:0}.info-history-title strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info-history-main p{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0 0}.info-history-time{font-size:9px;color:#8d94a3;white-space:nowrap}.info-history-arrow{font-size:20px;color:#b4b9c4}.important-dot{width:6px;height:6px;border-radius:50%;background:#d84b42;flex:0 0 auto}.info-empty{padding:30px 18px;border:1px dashed var(--line);border-radius:15px;background:#fcfcfd;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--muted)}.info-empty-icon{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef7f5;color:var(--primary);font-weight:900;margin-bottom:3px}.info-empty strong{font-size:12px;color:#555d6d}.info-empty span{font-size:10px}.info-detail-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;margin-bottom:18px}.info-detail-card h2{font-size:17px;margin:7px 28px 8px 0}.info-detail-card p{font-size:12px;line-height:1.65;color:#555d6d;white-space:pre-wrap;margin:0}.info-detail-close{position:absolute;right:12px;top:10px;text-decoration:none;color:#8b92a1;font-size:22px;line-height:1}

/* Parent schedule: 5 өдрийн өгөгдлийг нэг удаа ачаалаад JS hide/show хийнэ. */
.schedule-day-switch button.schedule-day{font-family:inherit;cursor:pointer;width:100%;appearance:none;-webkit-appearance:none}
.schedule-day-panel{animation:scheduleFade .12s ease-out}
.compact-empty strong{display:block;color:var(--text);margin-bottom:4px}.compact-empty span{display:block}
@keyframes scheduleFade{from{opacity:.65;transform:translateY(2px)}to{opacity:1;transform:none}}

/* Parent - Ангийн мэдээ */
.class-news-today,.class-news-history{margin-top:18px}
.news-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 9px;border-radius:999px;background:#eef4ff;font-size:13px;font-weight:700}
.news-empty-state{text-align:center;padding:32px 18px;border:1px dashed #d9dee8;border-radius:16px;background:#fff}
.news-empty-icon{font-size:28px;margin-bottom:8px;opacity:.55}
.news-empty-state strong{display:block;font-size:16px}
.news-empty-state p{margin:6px 0 0;color:#7b8494;font-size:13px}
.news-today-list{display:grid;gap:12px}
.news-feature-card{background:#fff;border:1px solid #e7eaf0;border-radius:16px;padding:16px;box-shadow:0 4px 16px rgba(20,35,60,.04)}
.news-feature-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:#7b8494;font-size:12px}
.news-feature-card h3{margin:0 0 8px;font-size:18px}
.news-feature-image{width:100%;max-height:340px;object-fit:cover;border-radius:12px;margin:4px 0 10px}
.news-feature-body{margin:0;white-space:pre-wrap;line-height:1.55}
.news-history-list{background:#fff;border:1px solid #e7eaf0;border-radius:16px;overflow:hidden}
.news-history-item{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid #eef0f4}
.news-history-item:last-child{border-bottom:0}
.news-history-main{min-width:0;flex:1}
.news-history-main h3{margin:0 0 4px;font-size:15px}
.news-history-main p{margin:0;color:#747d8c;font-size:13px;line-height:1.4}
.news-history-time{white-space:nowrap;color:#8a93a2;font-size:12px;padding-top:2px}
.news-history-empty{padding:24px 16px;text-align:center;color:#7b8494;background:#fff;border:1px dashed #d9dee8;border-radius:16px}
@media(max-width:600px){.news-history-item{padding:13px 14px}.news-history-time{font-size:11px}.news-feature-card{padding:14px}}

/* Parent homework: today + recent two-week history */
.homework-section{margin-top:18px}.homework-history-section{margin-top:26px}.homework-today-list{display:grid;gap:9px}.homework-today-card{display:block;background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px 15px;color:inherit;text-decoration:none;box-shadow:0 4px 14px rgba(26,34,54,.035)}.homework-today-card.read{background:#fcfcfd}.homework-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.homework-subject{font-size:10px;color:var(--primary);font-weight:850}.homework-today-card h3{font-size:15px;line-height:1.35;margin:0 0 5px}.homework-today-card p{font-size:11px;line-height:1.5;color:#687181;margin:0 0 8px}.homework-card-due{display:block;font-size:10px;color:#8b92a0}.homework-history-list{background:#fff;border:1px solid var(--line);border-radius:15px;overflow:hidden}.homework-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto 12px;align-items:center;gap:9px;padding:13px 14px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line2)}.homework-history-item:last-child{border-bottom:0}.homework-history-item.read{background:#fcfcfd}.homework-history-main{min-width:0}.homework-history-title{display:flex;align-items:center;gap:7px;min-width:0}.homework-history-title strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.homework-history-main p{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0 0}.homework-history-time{font-size:9px;color:#8d94a3;white-space:nowrap}.homework-new-dot{width:6px;height:6px;border-radius:50%;background:#d84b42;flex:0 0 auto}.homework-detail-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;margin-bottom:18px}.homework-detail-card h2{font-size:17px;margin:7px 28px 8px 0}.homework-detail-card p{font-size:12px;line-height:1.65;color:#555d6d;white-space:pre-wrap;margin:0 0 12px}.homework-detail-meta{font-size:10px;color:var(--primary);font-weight:800}.homework-due{display:inline-block;margin:0 0 12px;padding:6px 9px;border-radius:9px;background:#f5f6f8;color:#697181;font-size:10px}.homework-empty{min-height:120px;justify-content:center}


/* Parent attendance */
.attendance-list{display:grid;gap:10px}.attendance-card{background:#fff;border:1px solid #e6e9ef;border-radius:14px;padding:14px;transition:.15s ease}.attendance-card.is-highlight{box-shadow:0 0 0 2px rgba(0,148,125,.18);border-color:#00947d}.attendance-card-top{display:flex;justify-content:space-between;gap:12px;align-items:center}.attendance-card-top>div{display:grid;gap:3px}.attendance-card-top small{color:#7b8494}.attendance-note{margin-top:12px;padding-top:12px;border-top:1px solid #eef0f4;display:flex;align-items:center;justify-content:space-between;gap:12px}.attendance-note span{color:#596273;font-size:14px}.attendance-explain-summary{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;margin-bottom:14px;border-radius:10px;background:#f5f7f9}.attendance-explain-summary span{color:#727b8b}@media(max-width:600px){.attendance-note{align-items:flex-start;flex-direction:column}.attendance-note .btn{width:100%}}

/* Teacher attendance: monthly strip + fast check register */
.teacher-attendance-workspace{overflow:hidden}.attendance-head{align-items:center}.attendance-month-nav{display:flex;align-items:center;gap:8px}.attendance-month-nav strong{min-width:118px;text-align:center;font-size:13px}.attendance-month-arrow{width:31px;height:31px;border:1px solid var(--line);border-radius:9px;display:grid;place-items:center;text-decoration:none;color:var(--text);font-size:20px;background:#fff}.attendance-month-arrow:hover{border-color:var(--primary);color:var(--primary)}
.attendance-month-strip{display:flex;gap:6px;overflow-x:auto;padding:3px 1px 10px;margin-bottom:5px;scrollbar-width:thin}.attendance-day-tile{position:relative;flex:0 0 48px;height:58px;border:1px solid var(--line);border-radius:11px;background:#fff;text-decoration:none;color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.attendance-day-tile span{font-size:16px;font-weight:850;line-height:18px}.attendance-day-tile small{font-size:9px;color:var(--muted);font-weight:750}.attendance-day-tile i{position:absolute;width:6px;height:6px;border-radius:50%;background:var(--primary);bottom:5px}.attendance-day-tile.recorded{border-color:#cde6df}.attendance-day-tile.weekend{background:#f4f5f7;color:#8c93a0}.attendance-day-tile.weekend small{color:#a0a6b0}.attendance-day-tile.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 5px 14px rgba(0,148,125,.18)}.attendance-day-tile.active small{color:rgba(255,255,255,.78)}.attendance-day-tile.active i{background:#fff}.attendance-day-tile.weekend.active{background:#737b88;border-color:#737b88}.attendance-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:1px 0 14px;color:var(--muted);font-size:10px}.attendance-legend>span{display:flex;align-items:center;gap:5px}.legend-dot.recorded{width:7px;height:7px;border-radius:50%;background:var(--primary)}.legend-box.weekend{width:12px;height:12px;border-radius:4px;background:#f0f1f3;border:1px solid #dfe2e7}.attendance-weekend-note{padding:9px 11px;margin-bottom:12px;border-radius:10px;background:#f5f6f8;color:#697181;font-size:11px}
.attendance-selected-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line2);background:#fafbfc;border-radius:11px 11px 0 0}.attendance-selected-bar>div{display:grid;gap:2px}.attendance-selected-bar strong{font-size:13px}.attendance-selected-bar span{font-size:10px;color:var(--muted)}.attendance-all-present{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;white-space:nowrap}.attendance-all-present input{width:17px;height:17px;accent-color:var(--primary)}
.attendance-register-table{border-radius:0 0 12px 12px}.attendance-register-table table{min-width:760px}.attendance-student-row{transition:background .12s ease}.attendance-student-row.is-away{background:#fffaf8}.attendance-check-cell{text-align:center}.attendance-check{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.attendance-check input{position:absolute;opacity:0;pointer-events:none}.attendance-check span{width:23px;height:23px;border:2px solid #ccd1da;border-radius:7px;background:#fff;display:grid;place-items:center}.attendance-check input:checked+span{background:var(--primary);border-color:var(--primary)}.attendance-check input:checked+span:after{content:'✓';color:#fff;font-size:15px;font-weight:900;line-height:1}.absence-status{min-width:115px;padding:7px 9px}.present-label{display:inline-flex;padding:4px 8px;border-radius:999px;background:#edf8f5;color:#197764;font-size:10px;font-weight:850}.attendance-existing-note{display:inline-block;max-width:260px;color:#596273;font-size:11px;line-height:1.35}.attendance-no-note{color:#a4a9b3}.attendance-savebar{display:flex;align-items:center;justify-content:flex-end;gap:12px}.attendance-save-summary{margin-right:auto;font-size:11px;color:var(--muted)}.attendance-clear-form{margin-top:10px;text-align:right}
@media(max-width:700px){.attendance-selected-bar{align-items:flex-start;flex-direction:column}.attendance-all-present{width:100%}.attendance-savebar{align-items:stretch;flex-direction:column}.attendance-savebar .btn{width:100%}.attendance-save-summary{margin:0}.attendance-month-nav{width:100%;justify-content:space-between}.attendance-day-tile{flex-basis:45px;height:55px}.attendance-register-table{overflow:auto}.attendance-existing-note{max-width:180px}}
/* 2026-09-08 attendance matrix / parent weekly views */
.attendance-matrix-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;margin:12px 0}.attendance-matrix{border-collapse:separate;border-spacing:0;min-width:max-content;width:100%;font-size:11px}.attendance-matrix th,.attendance-matrix td{width:34px;min-width:34px;height:34px;text-align:center;border-right:1px solid #edf0f3;border-bottom:1px solid #edf0f3}.attendance-matrix .student-col{position:sticky;left:0;z-index:2;width:170px;min-width:170px;text-align:left;padding:0 10px;background:#fff;font-weight:700}.attendance-matrix thead .student-col{z-index:4}.attendance-matrix th{position:sticky;top:0;background:#fff;z-index:3}.attendance-matrix th a{display:flex;flex-direction:column;text-decoration:none;color:inherit;padding:4px}.attendance-matrix th small{font-size:8px;color:var(--muted)}.attendance-matrix .weekend{background:#f1f2f4}.attendance-mark.present{color:#16845f;font-weight:900}.attendance-mark.absent{color:#c23a3a;font-weight:900}.attendance-mark.sick,.attendance-mark.excused{color:#a56b00;font-weight:900}.attendance-matrix-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:8px 0 18px}.attendance-editor{border-top:1px solid var(--line);padding-top:15px}.parent-week-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 14px}.parent-week-nav a,.activity-week-arrow{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--text);background:#fff;font-size:20px}.parent-attendance-week{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.parent-att-day{border:1px solid var(--line);border-radius:12px;background:#fff;padding:9px 3px;display:grid;gap:3px;place-items:center}.parent-att-day b{font-size:15px}.parent-att-day small{font-size:9px;color:var(--muted)}.parent-att-day span{font-size:18px;font-weight:900}.parent-att-day.ok span{color:#16845f}.parent-att-day.danger span{color:#c23a3a}.parent-att-day.warn span{color:#a56b00}.parent-att-day.selected{box-shadow:0 0 0 2px rgba(0,148,125,.18);border-color:var(--primary)}.parent-att-score{text-align:center;margin:12px 0 16px}.parent-att-score strong{font-size:24px;display:block}.parent-att-score span{font-size:10px;color:var(--muted)}.parent-att-detail{display:none;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}.parent-att-detail.active{display:block}.parent-att-detail>div:first-child{display:flex;justify-content:space-between}.activity-week-picker{display:flex;align-items:center;gap:6px;margin:8px 0 6px}.activity-week-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;flex:1}.activity-day-btn{display:grid;place-items:center;text-decoration:none;border:1px solid var(--line);border-radius:9px;padding:5px 2px;color:var(--text);background:#fff}.activity-day-btn small{font-size:8px;color:var(--muted)}.activity-day-btn b{font-size:12px}.activity-day-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}.activity-day-btn.active small{color:#fff}.activity-selected-date{font-size:10px;color:var(--muted);margin-bottom:8px}

/* 2026-09-08 teacher attendance popup editor */
.attendance-day-open{cursor:pointer}
.attendance-day-modal{z-index:1400}
.attendance-modal-card{width:min(980px,calc(100vw - 28px));max-width:980px;max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.attendance-modal-head{flex:0 0 auto}
.attendance-modal-head>div{display:grid;gap:3px}
.attendance-modal-head span{font-size:10px;color:var(--muted)}
.attendance-modal-weekend-note{margin:10px 16px 0;flex:0 0 auto}
.attendance-modal-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-bottom:1px solid var(--line2);background:#fafbfc;flex:0 0 auto}
.attendance-modal-hint{font-size:10px;color:var(--muted);text-align:right}
.attendance-modal-body{padding:0;overflow:hidden;flex:1 1 auto;min-height:0}
.attendance-modal-body form{height:100%;min-height:0}
.attendance-student-scroll{height:100%;max-height:58vh;overflow:auto;background:#fff;scrollbar-width:thin}
.attendance-student-scroll .attendance-register-table{min-width:760px;margin:0;border:0;border-radius:0}
.attendance-student-scroll .attendance-register-table thead th{position:sticky;top:0;z-index:3;background:#fafbfc;box-shadow:0 1px 0 var(--line2)}
.attendance-modal-foot{flex:0 0 auto;align-items:center;justify-content:space-between}
.attendance-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.attendance-modal-actions .attendance-clear-form{margin:0}
.attendance-modal-actions .btn{white-space:nowrap}
@media(max-width:700px){
  .attendance-modal-card{width:calc(100vw - 14px);max-height:96vh}
  .attendance-modal-tools{align-items:flex-start;flex-direction:column}
  .attendance-modal-hint{text-align:left}
  .attendance-student-scroll{max-height:62vh}
  .attendance-modal-foot{align-items:stretch;flex-direction:column}
  .attendance-modal-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .attendance-modal-actions .attendance-clear-form{grid-column:1/-1}
  .attendance-modal-actions .attendance-clear-form .btn{width:100%}
  .attendance-modal-actions>.btn{width:100%}
  .attendance-save-summary{margin:0}
}

/* 2026-09-08 Homework batch compose / preview / success */
.save-toast{position:fixed;top:22px;right:22px;z-index:1600;max-width:min(420px,calc(100vw - 32px));padding:13px 16px;border-radius:12px;background:#176c52;color:#fff;box-shadow:0 16px 40px rgba(0,0,0,.20);font-size:14px;font-weight:700;animation:babToastIn .18s ease-out}.save-toast.is-hiding{opacity:0;transform:translateY(-6px);transition:.25s ease}.homework-compose-modal{width:min(980px,100%);height:min(90vh,920px)}.homework-compose-modal .modal-head{align-items:flex-start}.homework-compose-modal .modal-head p,.homework-preview-modal .modal-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.homework-compose-body{display:flex;flex-direction:column}.homework-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.homework-subject-editor{display:flex;flex-direction:column;gap:10px;max-height:48vh;overflow-y:auto;padding:2px 8px 10px 2px}.homework-subject-row{display:grid;grid-template-columns:190px 1fr;gap:12px;align-items:start;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fff}.homework-subject-row>label{font-weight:700;font-size:13px;padding-top:8px;display:flex;gap:7px;align-items:center}.homework-subject-row textarea{min-height:76px;resize:vertical}.subject-no{display:inline-flex;min-width:22px;height:22px;align-items:center;justify-content:center;border-radius:6px;background:#f1f3f6;color:var(--muted);font-size:11px}.homework-student-scroll{max-height:180px}.homework-preview-modal{width:min(760px,100%);max-height:90vh}.homework-preview-warning{padding:12px 14px;margin-bottom:12px;border:1px solid #f0c56a;background:#fff7df;color:#76520c;border-radius:11px;line-height:1.45;font-size:13px}.homework-preview-list{display:flex;flex-direction:column;gap:8px;max-height:55vh;overflow-y:auto;padding-right:5px}.homework-preview-item{padding:12px 13px;border:1px solid var(--line);border-radius:11px;background:#fff}.homework-preview-item strong{display:block;margin-bottom:5px}.homework-preview-item p{margin:0;white-space:pre-wrap;line-height:1.5}.homework-preview-item.is-empty{background:#fafafa;border-style:dashed}.homework-preview-item.is-empty p{color:var(--muted);font-style:italic}.legacy-homework{margin-top:28px;padding-top:18px;border-top:1px solid var(--line)}.legacy-homework h3{font-size:14px;margin:0 0 4px}.legacy-homework-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line2);font-size:12px}.homework-detail-link{display:block;margin-top:10px;font-size:12px;font-weight:700;color:var(--primary)}.homework-batch-detail{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}.homework-batch-detail-head{padding:18px;border-bottom:1px solid var(--line)}.homework-batch-detail-head h2{margin:5px 0 7px;font-size:20px}.homework-batch-detail-head p{margin:0;color:var(--muted)}.homework-batch-subjects{display:flex;flex-direction:column}.homework-detail-subject{padding:16px 18px;border-bottom:1px solid var(--line2)}.homework-detail-subject:last-child{border-bottom:0}.homework-detail-subject h3{margin:0 0 7px;font-size:15px}.homework-detail-subject p{margin:0;white-space:pre-wrap;line-height:1.6}.homework-detail-subject.is-empty{background:#fafbfc}.homework-no-task{color:var(--muted);font-style:italic}.homework-batch-table td{vertical-align:middle}
@keyframes babToastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media(max-width:720px){.save-toast{top:12px;right:12px;left:12px;max-width:none}.homework-meta-grid{grid-template-columns:1fr}.homework-compose-modal{height:94vh}.homework-subject-editor{max-height:50vh}.homework-subject-row{grid-template-columns:1fr;gap:5px}.homework-subject-row>label{padding-top:0}.homework-preview-list{max-height:58vh}}

/* 2026-09-10 backdated content + optional notification */
.backdate-notify-box{margin:12px 0 16px;padding:12px 14px;border:1px solid #d9e3ea;border-radius:10px;background:#f8fafb}.backdate-notify-box label,.notify-check{display:flex;align-items:center;gap:8px;font-weight:600}.backdate-notify-box input,.notify-check input{width:auto!important;margin:0}.backdate-notify-box small{display:block;margin-top:5px;color:#6b7280}.field .notify-check{margin-top:8px}.field .notify-check+small{display:block;margin-top:5px}


/* 2026-09-10 Parent council + fund permission + teacher schedule pivot */
.schedule-selection-note{margin:0 0 10px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:#f8fafb;color:var(--muted);font-size:12px}.schedule-pivot-wrap{overflow-x:auto}.schedule-pivot{min-width:760px;table-layout:fixed}.schedule-pivot .schedule-period-head{width:105px}.schedule-pivot .schedule-day-column{text-align:center;min-width:125px}.schedule-period-row{width:105px;background:#fafbfc;text-align:left;vertical-align:middle}.schedule-period-row strong{display:block}.schedule-period-row span{display:block;margin-top:4px;color:var(--muted);font-size:10px;font-weight:400;white-space:nowrap}.schedule-pivot .schedule-cell{position:relative;min-height:78px;padding:5px;transition:opacity .15s ease,background .15s ease,box-shadow .15s ease}.schedule-pivot .schedule-subject{appearance:none;-webkit-appearance:none;border:0;background:transparent;width:100%;min-height:68px;padding:9px 8px;text-align:left;cursor:pointer;color:inherit;font:inherit;border-radius:9px}.schedule-pivot .schedule-subject strong{display:block;font-size:13px}.schedule-pivot .schedule-subject span{display:block;margin-top:5px;color:var(--muted);font-size:10px}.schedule-edit-link{position:absolute;right:7px;bottom:5px;font-size:10px;font-weight:700;color:var(--primary);opacity:.58;z-index:3}.schedule-cell:hover .schedule-edit-link{opacity:1}.schedule-cell.is-subject-match{background:#eef8f5;box-shadow:inset 0 0 0 2px var(--primary)}.schedule-cell.is-subject-match .schedule-subject strong{color:var(--primary)}.schedule-cell.is-subject-muted{opacity:.32}.schedule-cell.is-subject-muted:hover{opacity:.7}.schedule-cell.is-subject-match .schedule-edit-link{opacity:1}.council-member-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}.council-member-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:15px}.council-member-main{display:flex;gap:12px;align-items:flex-start}.council-avatar{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef5f7;color:var(--primary);font-weight:800;font-size:17px;flex:0 0 auto}.council-member-card h3{margin:1px 0 5px;font-size:15px}.council-member-card p{margin:3px 0;color:var(--muted);font-size:12px}.council-permission-row{margin-top:13px;padding-top:12px;border-top:1px solid var(--line2)}.council-permission-form{display:flex;align-items:center;justify-content:space-between;gap:12px}.council-card-actions{margin-top:10px;text-align:right}.council-limit-note{margin-top:14px;padding:10px 12px;border-radius:9px;background:#fff7df;color:#76520c;font-size:12px}.council-modal-card{width:min(640px,100%)}.council-access-banner{display:flex;flex-direction:column;gap:4px;margin-bottom:12px;padding:12px 14px;border:1px solid #b8ded2;border-radius:12px;background:#eef8f5}.council-access-banner strong{color:var(--primary)}.council-access-banner span{font-size:12px;color:var(--muted)}.parent-fund-actions{display:flex;justify-content:flex-end;margin-bottom:12px}.parent-fund-admin-card{margin-bottom:16px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}.parent-own-funds{margin-top:15px}.parent-own-funds:before{content:'Өөрийн хүүхдийн төлөлт';display:block;margin:6px 0 10px;font-size:14px;font-weight:800}
@media(max-width:720px){.schedule-pivot{min-width:680px}.council-member-grid{grid-template-columns:1fr}.council-permission-form{align-items:flex-start;flex-direction:column}.council-permission-form .btn{width:100%}.parent-fund-actions .btn{width:100%}.parent-fund-admin-card{padding:10px}}

/* 2026-09-10 compact grouped guardian access print */
.access-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.access-toolbar-actions form{margin:0}.access-print-sheet{background:#fff}.access-print-header{display:grid;grid-template-columns:1fr 88px;gap:14px;align-items:start;padding:0 0 10px;border-bottom:2px solid #222;margin-bottom:8px}.access-print-title h1{font-size:18px;line-height:1.2;margin:0 0 3px}.access-print-title>div{font-size:12px;font-weight:800;margin-bottom:5px}.access-print-title p{font-size:9.5px;line-height:1.35;margin:0;color:#444}.access-print-qr{width:82px;height:82px;object-fit:contain}.access-print-table{width:100%;border-collapse:collapse;font-size:10px;line-height:1.2}.access-print-table th,.access-print-table td{border:1px solid #b9b9b9;padding:4px 6px;text-align:left;vertical-align:middle}.access-print-table th{background:#f3f3f3;font-size:9px}.access-print-table .access-student-col{width:31%}.access-print-table tbody tr{break-inside:avoid;page-break-inside:avoid}.access-print-table td:nth-child(2){white-space:normal}.access-print-table strong{font-size:10.5px}
@media print{.access-print-header{grid-template-columns:1fr 76px;gap:10px;margin-bottom:6px;padding-bottom:7px}.access-print-title h1{font-size:15px}.access-print-title>div{font-size:10px}.access-print-title p{font-size:8px;line-height:1.25}.access-print-qr{width:72px;height:72px}.access-print-table{font-size:8.5px;line-height:1.12}.access-print-table th,.access-print-table td{padding:2.5px 4px}.access-print-table th{font-size:8px}.access-print-table strong{font-size:9px}.access-print-table thead{display:table-header-group}}

/* Bab.mn official logo */
.access-print-brand{display:flex;align-items:center;gap:8px}.access-print-brand img{width:34px;height:34px;object-fit:contain;flex:0 0 auto}.access-print-brand h1{margin:0}.credential-brand .brandmark{width:30px;height:30px;box-shadow:none;border:1px solid #eceef3}
@media print{.access-print-brand img{width:28px;height:28px}.access-print-brand{gap:6px}}

/* Stable full-page add/edit forms: accessible for parents and senior teachers. */
.edit-page-wrap{width:100%;margin:0 auto 24px;display:block;position:static;background:none;padding:0}
.edit-page-card{width:100%;max-width:100%;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:none;overflow:visible}
.edit-page-card .modal-body{overflow:visible;padding:20px}
.edit-page-card .modal-head{gap:16px;flex-wrap:wrap}
.edit-page-card .modal-foot{position:sticky;bottom:0;z-index:2;border-radius:0 0 14px 14px}
.activity-detail-link{display:inline-block;color:var(--primary,#2563eb);font-size:12px;margin-top:4px}
@media(max-width:600px){.edit-page-card .modal-body{padding:12px}.edit-page-card .modal-foot{padding:12px}}

/* Simple announcement editor */
.bab-rich-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:9px;background:#f6f8fb;border:1px solid #dce2e9;border-radius:9px 9px 0 0}
.bab-rich-toolbar button{border:1px solid #d5dce5;border-radius:6px;background:#fff;padding:7px 10px;cursor:pointer;color:#29384c;font-size:13px}
.bab-rich-toolbar button:focus-visible,.bab-rich-editor:focus{outline:2px solid #3487d3;outline-offset:1px}
.bab-rich-editor{border:1px solid #dce2e9;border-top:0;border-radius:0 0 9px 9px;background:white;min-height:220px;padding:14px;font-size:15px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.bab-rich-editor p,.bab-announcement-content p{margin:0 0 10px}
.bab-rich-editor ul,.bab-rich-editor ol,.bab-announcement-content ul,.bab-announcement-content ol{padding-left:25px;margin:8px 0 12px}
.bab-announcement-content{font-size:14px;line-height:1.8;color:#394252;overflow-wrap:anywhere;white-space:normal}
.bab-announcement-content div{margin-bottom:5px}

/* Announcement editor: explicit specificity to avoid generic form/div styles. */
#announcementModal .bab-rich-toolbar{display:flex!important;flex-wrap:wrap;align-items:center;gap:7px;padding:10px 12px;background:#f4f6fb;border:1px solid #d4dce8;border-radius:10px 10px 0 0;box-sizing:border-box;width:100%}
#announcementModal .bab-rich-toolbar button{width:auto;min-width:38px;height:36px;padding:6px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#1e293b;font-size:14px;font-weight:500;cursor:pointer}
#announcementModal .bab-rich-editor[contenteditable="true"]{display:block!important;box-sizing:border-box;width:100%;min-height:260px;padding:16px 18px;border:1px solid #d4dce8;border-top:0;border-radius:0 0 10px 10px;background:#fff;color:#172033;font-size:16px;line-height:1.65;white-space:pre-wrap;overflow-wrap:break-word;overflow-y:auto;outline:none}
#announcementModal .bab-rich-editor[contenteditable="true"]:focus{border-color:#6366f1;box-shadow:inset 0 0 0 1px #6366f1}
#announcementModal .bab-rich-editor[contenteditable="true"]:empty:before{content:"Зарлалын агуулгыг энд бичнэ үү...";color:#94a3b8;pointer-events:none}

/* Login tracking - teacher */
.login-track-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.login-track-summary>div{border:1px solid #e2e8f0;background:#fff;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:8px}
.login-track-summary small{color:#64748b}.login-track-summary strong{font-size:26px;color:#1e293b}
.login-track-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.login-track-filters a{display:inline-block;padding:10px 16px;border:1px solid #cbd5e1;border-radius:9px;color:#334155;text-decoration:none;background:#fff}
.login-track-filters a.chosen{background:#2563eb;color:#fff;border-color:#2563eb}
@media(max-width:680px){.login-track-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

.login-track-filters button{display:inline-block;padding:10px 16px;border:1px solid #cbd5e1;border-radius:9px;color:#334155;background:#fff;cursor:pointer;font:inherit}.login-track-filters button.chosen{background:#2563eb;color:#fff;border-color:#2563eb}
.week-dashboard-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.week-dashboard-cards>div,.week-panel{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px}.week-dashboard-cards small{display:block;color:#64748b}.week-dashboard-cards strong{font-size:25px}.week-dashboard-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.week-dashboard-toolbar input,.week-dashboard-toolbar select{padding:9px;border:1px solid #cbd5e1;border-radius:8px}.week-panel{margin:14px 0}.week-panel h2{font-size:18px;margin:0 0 12px}.week-progress{height:9px;background:#e2e8f0;border-radius:20px;overflow:hidden}.week-progress>span{display:block;height:100%;background:#16a34a}.week-dashboard-table{width:100%;border-collapse:collapse}.week-dashboard-table th,.week-dashboard-table td{padding:10px;border-bottom:1px solid #e2e8f0;text-align:left}.week-dashboard-table th{font-size:12px;color:#64748b}.week-dashboard-note{font-size:12px;color:#64748b}@media(max-width:750px){.week-dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Overview dashboard: scoped styling to avoid collisions with generic page controls */
.overview-shell{display:block;max-width:1200px;margin:0 auto;padding:4px 0 28px;color:#172b4d}
.overview-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:4px 0 20px}
.overview-heading h1{font-size:27px;line-height:1.25;font-weight:750;margin:0 0 6px;color:#162a47}
.overview-heading p{margin:0;color:#64748b;font-size:14px}
.overview-class-pill{padding:7px 12px;border-radius:999px;background:#eaf2ff;color:#2256a3;font-size:12px;font-weight:700;white-space:nowrap}
.overview-period{border:1px solid #dfe7f2;background:#fff;border-radius:16px;padding:18px;margin-bottom:16px;box-shadow:0 3px 14px rgba(30,50,90,.04)}
.overview-period-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px}
.overview-period-nav .overview-nav-btn:last-child{justify-self:end}
.overview-nav-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:10px 13px;border:1px solid #d8e2f0;background:#f8faff;border-radius:10px;color:#24549a!important;text-decoration:none!important;font-size:13px;font-weight:650;cursor:pointer;white-space:nowrap}
.overview-nav-btn:hover{background:#eaf2ff}
.overview-period-label{text-align:center}.overview-period-label small{display:block;color:#64748b;font-size:12px;margin-bottom:3px}.overview-period-label strong{font-size:17px;color:#1c3556;white-space:nowrap}
.overview-date-picker{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:18px 0 12px;padding-top:15px;border-top:1px solid #e8edf5}
.overview-date-picker label{font-size:13px;font-weight:650;color:#334155;margin:0}
.overview-date-picker input{width:auto;min-height:39px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;padding:7px 10px;font:inherit;color:#1e293b}
#overviewDayLabel{font-size:12px;color:#64748b}
.overview-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.overview-day{min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px 4px;border:1px solid #e1e8f2;border-radius:10px;background:#f8fafc;color:#334155;cursor:pointer}
.overview-day small{font-size:11px;color:#64748b}.overview-day strong{font-size:17px}.overview-day.is-selected,.overview-day:hover{border-color:#3165b5;background:#eaf2ff;color:#174d99}
.overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}
.overview-stat{display:flex;flex-direction:column;min-width:0;min-height:125px;gap:9px;background:#fff;border:1px solid #dfe7f2;border-radius:14px;padding:18px;box-shadow:0 3px 14px rgba(30,50,90,.04)}
.overview-stat>span{font-size:13px;color:#475569;font-weight:650}.overview-stat>strong{font-size:30px;line-height:1.1;color:#1d4b94;font-weight:750}.overview-stat>small{font-size:11px;color:#64748b;line-height:1.4}
.overview-shell .overview-note{font-size:12px;color:#64748b;line-height:1.6;margin:6px 0 18px}
.overview-shell .week-panel{margin:16px 0;border-radius:14px;padding:20px;box-shadow:0 3px 14px rgba(30,50,90,.04)}
.overview-shell .week-panel h2{font-size:18px;color:#1e3556;font-weight:700;margin:0 0 15px}
.overview-shell .week-dashboard-table{width:100%;min-width:590px}
.overview-shell .week-dashboard-table th{background:#f5f8fc;font-size:12px}
.overview-shell .week-dashboard-table td{font-size:13px;vertical-align:middle}
.overview-filter-hint{font-size:12px;font-weight:500;color:#64748b}
.overview-empty{padding:12px 0;color:#64748b;font-size:13px}
.overview-shell .week-dashboard-note{line-height:1.5;margin-top:12px}
@media(max-width:900px){.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.overview-heading h1{font-size:23px}.overview-class-pill{display:none}.overview-period{padding:12px}.overview-period-nav{grid-template-columns:1fr 1fr}.overview-period-label{grid-column:1/-1;grid-row:1}.overview-period-nav .overview-nav-btn{grid-row:2;font-size:11px;padding:9px 6px}.overview-period-nav .overview-nav-btn:last-child{grid-column:2}.overview-days{gap:4px}.overview-day{padding:8px 2px}.overview-stat{padding:13px;min-height:113px}.overview-stat>strong{font-size:27px}.overview-shell .week-panel{padding:13px}}

/* 2026-10-12: compact Overview layout; avoid stretched navigation and oversized controls */
.overview-shell{max-width:1120px;padding:0 0 22px}
.overview-heading{margin:0 0 12px;align-items:center}
.overview-heading h1{font-size:23px;margin-bottom:3px}
.overview-heading p{font-size:12px}
.overview-period{padding:14px 16px;margin-bottom:12px;border-radius:12px}
.overview-period-nav{display:flex;align-items:center;justify-content:space-between;gap:12px}
.overview-period-nav .overview-nav-btn,.overview-period-nav .overview-nav-btn:last-child{flex:0 0 auto;justify-self:auto;width:auto;min-width:0}
.overview-period-label{flex:1;min-width:0}
.overview-period-label strong{font-size:15px}
.overview-nav-btn{font-size:12px;padding:8px 12px;line-height:1.25}
.overview-date-picker{margin:11px 0 9px;padding-top:10px;gap:8px}
.overview-date-picker label{font-size:12px}
.overview-date-picker input{min-height:34px;padding:5px 8px;font-size:12px}
.overview-days{gap:6px}
.overview-day{padding:6px 3px;gap:0;border-radius:8px}
.overview-day strong{font-size:14px}
.overview-stats{gap:10px;margin:12px 0}
.overview-stat{min-height:95px;padding:13px 14px;gap:5px;border-radius:11px}
.overview-stat>span{font-size:12px}.overview-stat>strong{font-size:25px}.overview-stat>small{font-size:11px}
.overview-shell .overview-note{margin:5px 0 11px;font-size:11px}
.overview-shell .week-panel{padding:15px;margin:12px 0}
.overview-shell .week-panel h2{font-size:16px;margin-bottom:10px}
@media(max-width:650px){
 .overview-period-nav{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
 .overview-period-label{grid-column:1/-1;grid-row:1}
 .overview-period-nav .overview-nav-btn{grid-row:2;width:100%;white-space:normal;text-align:center}
 .overview-period-nav .overview-nav-btn:last-child{grid-column:2}
 .overview-date-picker{align-items:stretch}
 .overview-date-picker label{width:100%}
 .overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .overview-stat{padding:11px;min-height:91px}
 .overview-stat>strong{font-size:23px}
}

/* 2026-10-12: Overview follows teacher content width; no centered narrow column. */
.role-teacher .teacher-page .overview-shell{width:100%;max-width:none;margin-left:0;margin-right:0;box-sizing:border-box}

/* Announcement quick emoji and mandatory publish preview */
.bab-emoji-toolbar{display:flex;flex-wrap:wrap;gap:4px;padding:8px;border:1px solid #dbe1e8;border-top:0;background:#f8fafc}
.bab-emoji-toolbar button{font-size:21px;line-height:1.4;min-width:34px;border:0;border-radius:6px;background:transparent;cursor:pointer}
.bab-emoji-toolbar button:hover,.bab-emoji-toolbar button:focus{background:#e4eaf7}
.bab-announcement-preview[hidden]{display:none!important}
.bab-announcement-preview{position:fixed;inset:0;background:rgba(15,23,42,.65);z-index:2000;display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto}
.bab-preview-card{width:min(100%,660px);max-height:90vh;overflow:auto;background:#fff;border-radius:14px;padding:22px;box-shadow:0 20px 70px #0003}
.bab-preview-header{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e2e8f0;padding-bottom:12px;margin-bottom:16px}
.bab-preview-header h3{margin:0}.bab-preview-meta{font-size:13px;color:#64748b;margin-bottom:10px}
.bab-preview-body{line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere;min-height:75px;margin:16px 0}
.bab-preview-details{border-top:1px solid #e2e8f0;padding-top:12px;color:#64748b;font-size:13px}

/* 2026-10-12: login banner already contains brand and messages; avoid duplicate overlay. */
.login-visual{padding:0;background:#e8f4fc;}
.login-visual:after{display:none;}
.login-visual img{object-fit:contain;object-position:center center;opacity:1;}
@media (max-width:900px){.login-visual{min-height:300px;}}
