/* Only the administrator page uses these rules. */
.management-page{--ink:#233650;--muted:#7c8ba2;--line:#e5eaf2;--blue:#386fe5;background:#f6f8fc;line-height:1.6;-webkit-font-smoothing:antialiased}
.management-page svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle}
.management-page .management-icons{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.management-page button,.management-page .button{min-height:42px;border-radius:10px;padding:9px 16px;font-size:14px;font-weight:600;line-height:1.4;transition:background .15s,border-color .15s,box-shadow .15s;color:#536a8d;white-space:nowrap}
.management-page button:hover,.management-page .button:hover{background:#f3f6fc;border-color:#b9cbee}
.management-page button.primary,.management-page .button.primary{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 3px 6px #386fe514}
.management-page button.primary:hover,.management-page .button.primary:hover{background:#2d60d0;border-color:#2d60d0}
.management-page :is(button,a,input):focus-visible{outline:3px solid #b1c8fa;outline-offset:3px}
.management-page button:disabled{opacity:.5;cursor:wait}
.management-page header.teaching-header{max-width:1184px;padding:22px 32px;min-height:90px}
.management-brand{display:flex;align-items:center;gap:10px;color:var(--ink)}
.management-brand strong{letter-spacing:1px;font-size:24px}
.management-brand>span{font-size:13px;font-weight:500;border-left:1px solid #dce3ef;padding-left:15px;margin-left:6px;color:var(--muted)}
.management-page header.teaching-header nav{gap:24px;font-size:14px}
.management-page header.teaching-header nav>a:first-child{color:#71829a}
.management-page .teacher-entry{display:flex;align-items:center;gap:5px;color:var(--blue)}
.management-page .teacher-entry svg{width:15px;height:15px}
.management-page main.teaching-main{max-width:1184px;padding:26px 32px 64px}
.management-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}
.eyebrow{display:block;color:#7590b4;letter-spacing:2px;font-size:11px;font-weight:700;margin-bottom:7px}
.management-page-heading h1{font-size:30px;line-height:1.4;letter-spacing:.5px;margin:0 0 6px}
.management-page-heading p{font-size:14px;margin:0;color:#718198}
.management-private{display:flex;align-items:center;gap:6px;align-self:flex-end;margin-bottom:7px;color:#8292a9;font-size:12px}
.management-private svg{width:15px;height:15px}
.management-page #managementStatus:empty{display:none}
.management-page #managementStatus{padding:13px 16px;border:1px solid #e0e8f6;border-radius:12px;background:#edf3ff;color:#526b91;display:flex;align-items:center;gap:15px;margin:0 0 20px}
.management-page .teaching-card{padding:0;border-radius:18px;margin:0 0 24px;box-shadow:0 3px 13px #253b5d02;overflow:hidden}
.management-page .teaching-panel-heading{padding:25px 28px;align-items:center}
.management-page .teaching-panel-heading h2{margin:0;font-size:19px;line-height:1.5;letter-spacing:.2px}
.management-page .teaching-panel-heading p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.section-heading{display:flex;gap:14px;align-items:center;min-width:0}
.section-icon{width:44px;height:44px;border:1px solid #e4ecfc;background:#f0f5ff;color:var(--blue);display:inline-flex;justify-content:center;align-items:center;border-radius:13px;flex-shrink:0}
.section-icon svg{width:23px;height:23px}
.section-icon.subtle{background:#f5f7fa;border-color:#ebeff5;color:#8b9ab0}
.management-page .protection-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:50px;padding:0 28px 26px}
.management-field{min-width:0}
.management-page .management-field>label{display:block;font-size:13px;font-weight:600;margin:0 0 8px;color:#53657f}
.management-page .management-field>input{display:block;width:100%;min-width:0;height:46px;min-height:46px;padding:11px 13px;font:inherit;font-size:14px;color:var(--ink);border:1px solid #dce3ef;border-radius:10px;background:#fbfcfe;transition:border-color .15s,box-shadow .15s}
.management-page .management-field>input::placeholder{color:#9aa7ba;font-size:13px}
.management-page .management-field>input:focus{border-color:#7d9ff0;background:#fff;outline:none;box-shadow:0 0 0 3px #386fe50c}
.management-page .field-hint{font-size:12px;color:#8a98ad;line-height:1.7;font-weight:400;margin:8px 0 0}
.protection-switches{display:flex;flex-direction:column;gap:18px;padding-top:1px}
.management-page label.protection-switch{position:relative;display:flex;align-items:center;gap:16px;cursor:pointer;margin:0}
.protection-switch>span:first-child{flex:1;min-width:0}
.protection-switch strong{display:block;font-size:14px;font-weight:500}
.protection-switch small{display:block;font-size:12px;color:#8a98ad;margin-top:2px}
.management-page .protection-switch>input{position:absolute;width:40px;min-height:24px;height:24px;right:0;opacity:0;margin:0;cursor:pointer;z-index:1}
.switch-track{width:38px;height:22px;border-radius:99px;background:#dce3ee;position:relative;transition:background .15s;flex-shrink:0}
.switch-track:after{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #172f5526;transition:transform .15s}
.protection-switch input:checked+.switch-track{background:var(--blue)}
.protection-switch input:checked+.switch-track:after{transform:translateX(16px)}
.protection-switch input:focus-visible+.switch-track{outline:3px solid #b1c8fa;outline-offset:3px}
.protection-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;border-top:1px solid #edf0f6;padding:17px 28px;background:#fcfdff}
.protection-footer>p{display:flex;gap:6px;align-items:center;font-size:12px;color:#8292a9;margin:0;flex-wrap:wrap}
.protection-footer>p svg{width:14px;height:14px;color:#91a6c5}
.protection-footer>p span{color:#9ba8bb;font-size:11px}
.management-page .protection-footer .actions{margin:0;flex-wrap:nowrap}
.management-page #policyFeedback{font-size:12px;max-width:190px;line-height:1.6;color:#35826b}
.heading-count{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;min-width:23px;height:23px;padding:0 6px;border-radius:7px;background:#edf3ff;color:var(--blue);font-size:12px;font-weight:600;margin-left:5px}
.management-page .teaching-row{padding:24px 28px;align-items:flex-start;gap:15px}
.member-avatar{display:flex;align-items:center;justify-content:center;width:42px;height:42px;flex-shrink:0;border-radius:13px;background:#edf3ff;color:#5b7faf;font-size:17px;font-weight:600}
.management-page .teaching-row strong.member-name{display:block;font-size:16px;line-height:1.6}
.management-page .teaching-badge{font-size:11px;font-weight:500;padding:2px 7px;margin-left:9px;vertical-align:middle;background:#ecf7f2;color:#3a9277}
.management-page .teaching-badge.pending{background:#fff5df;color:#a27f39}
.management-page .teaching-badge.disabled{background:#f0f2f6;color:#8591a5}
.member-meta{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:5px;color:#8592a7;font-size:12px}
.member-meta .subject-chip{color:#5e79a4;background:#f0f4fb;padding:1px 7px;border-radius:5px}
.member-rooms{font-size:13px;color:#798ba5;margin:9px 0 0!important;display:flex;align-items:center;gap:6px}
.member-rooms svg{width:14px;height:14px}
.member-permissions{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.member-permissions span{font-size:11px;line-height:1.7;color:#8191a9;background:#f6f8fb;border:1px solid #ecf0f6;border-radius:5px;padding:2px 7px}
.management-page .teaching-row>.actions{display:grid;grid-template-columns:auto auto;gap:8px;align-self:center;justify-items:end}
.management-page .teaching-row>.actions button{font-size:12px;min-height:34px;padding:7px 10px;border-radius:8px;font-weight:500}
.management-page .teaching-row>.actions .danger-button{grid-column:1 / -1;border-color:transparent;color:#9aa6b8;background:none;padding:2px 0;min-height:26px}
.management-page .teaching-row>.actions .danger-button:hover{color:#bd625f}
.management-empty{text-align:center;padding:30px 24px 38px;border-top:1px solid #edf0f6;color:#a1adc0}
.management-empty>svg{display:block;width:30px;height:30px;margin:0 auto 10px;color:#b2c4dd}
.management-empty strong{display:block;font-size:14px;font-weight:500;color:#73849e}
.management-empty p{font-size:12px;margin:4px 0 0}
.management-page .teaching-audit{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:12px;padding:18px 28px;border-color:#edf0f6;align-items:start}
.audit-dot{width:8px;height:8px;background:#d8e3f7;border:2px solid #eef3fc;border-radius:50%;margin:7px 0 0 7px;box-shadow:0 0 0 3px #f4f7fc}
.audit-content strong{font-size:13px;font-weight:500;color:#536982}
.audit-content p{font-size:12px;margin:2px 0 0;color:#97a3b6}
.management-page .teaching-audit time{font-size:11px;white-space:nowrap;margin-top:2px;color:#93a1b6}
.management-page .management-login{max-width:500px;margin:35px auto;text-align:center;padding:36px}
.management-login h2{margin:15px 0 8px}.management-login p{font-size:13px;margin:0 0 22px}
/* The dialog header and footer stay visible while the choices scroll. */
.management-page dialog::backdrop{background:#1a2b465c;backdrop-filter:blur(5px)}
.management-page .member-dialog{width:min(804px,calc(100% - 40px));max-width:none;max-height:calc(100dvh - 48px);padding:0;border:1px solid #e3e9f3;border-radius:22px;background:#fff;box-shadow:0 30px 100px #18305229;overflow:hidden}
.member-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 50px);min-height:0;margin:0}
.member-dialog-header{display:flex;align-items:center;gap:14px;padding:24px 28px 23px;border-bottom:1px solid #edf0f6;flex-shrink:0}
.member-dialog-header h2{font-size:22px;letter-spacing:.2px;line-height:1.4;margin:0}
.member-dialog-header p{font-size:12px;margin:5px 0 0;color:#8b99ad;line-height:1.6}
.management-page .icon-button{width:32px;min-height:32px;height:32px;padding:5px;border:0;border-radius:9px;background:#f4f6fa;color:#98a4b6;margin-left:auto;align-self:flex-start;flex-shrink:0}
.management-page .icon-button:hover{background:#eaf0fb;color:#5e7da9}
.member-dialog-body{padding:24px 28px 28px;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
.member-section+.member-section{margin-top:25px;padding-top:23px;border-top:1px solid #edf0f6}
.member-section h3{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;margin:0 0 15px;line-height:1.5}
.member-section h3>span{font-size:10px;color:#87a0c5;background:#f1f5fb;border:1px solid #e9eef6;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;letter-spacing:.2px}
.member-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.member-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}
.member-section-heading h3{margin:0}.member-section-heading .field-hint{margin:0;font-size:11px}
.selection-count{font-size:11px;color:#7993ba;background:#f4f7fc;border-radius:6px;padding:2px 8px}
.room-choices{display:grid;grid-template-columns:1fr 1fr;gap:9px;max-height:208px;overflow-y:auto}
.management-page .choice-card{display:flex;align-items:center;gap:10px;min-width:0;min-height:45px;padding:11px 12px;border:1px solid #e4e9f2;border-radius:9px;background:#fff;color:#657793;cursor:pointer;transition:background .15s,border-color .15s;margin:0;font-size:13px;font-weight:400;line-height:1.5}
.management-page input[type=checkbox]{accent-color:var(--blue)}
.management-page .choice-card>input,.management-page .pause-teacher>input{width:17px;height:17px;min-height:17px;padding:0;margin:0;flex-shrink:0;cursor:pointer}
.choice-card>span{min-width:0;overflow-wrap:anywhere}
.management-page .choice-card:hover{background:#f8faff;border-color:#bccdef}
.management-page .choice-card.is-selected{border-color:#b7cdf9;background:#f3f7ff;color:#4266a1}
.management-page .teaching-preset{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0 0 20px}
.management-page .teaching-preset>button{display:block;text-align:left;border-radius:10px;padding:11px 13px;min-height:67px;font-weight:400;white-space:normal;background:#fff;border-color:#e1e7f1;position:relative}
.teaching-preset strong{display:block;font-size:13px;font-weight:600;line-height:1.6}
.teaching-preset small{display:block;font-size:11px;color:#94a1b4;margin-top:3px;font-weight:400}
.management-page .teaching-preset>button[aria-pressed=true]{color:var(--blue);border-color:#9dbaf4;background:#f2f6ff;box-shadow:0 0 0 1px #adc5f326}
.teaching-preset>button[aria-pressed=true]:after{content:"";position:absolute;width:5px;height:5px;border-radius:50%;background:#5787e7;top:12px;right:12px}
.permission-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.permission-group{min-width:0;border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.permission-group legend{font-size:11px;color:#98a5b8;padding:0 0 8px;float:left;width:100%;font-weight:500}
.management-page .permission-group .choice-card{min-height:40px;font-size:12px;padding:9px 10px;border-color:#e9edf4;background:#fafbfd;border-radius:8px;gap:8px}
.management-page .permission-group .choice-card.is-selected{background:#f2f6ff;border-color:#c3d5f8}
.management-page .pause-teacher{display:flex;align-items:center;gap:10px;margin:24px 0 0;padding:13px 15px;border:1px solid #f1e7df;background:#fffcf8;border-radius:10px;color:#96744a;cursor:pointer}
.pause-teacher strong{display:block;font-weight:500;font-size:13px}.pause-teacher small{display:block;color:#ae9d88;font-size:11px;margin-top:2px}
.member-dialog-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-shrink:0;padding:18px 28px;background:#fafcfe;border-top:1px solid #e8edf5}
.member-dialog-footer>div:first-child{min-width:0;font-size:11px;color:#8a9bb3}
.management-page #teacherMemberFeedback:empty{display:none}
.management-page #teacherMemberFeedback{font-size:12px;color:#c46060;margin:4px 0 0;line-height:1.6;max-width:340px;overflow-wrap:anywhere}
.management-page .member-dialog-footer .actions{margin:0;flex-wrap:nowrap;gap:9px}.member-dialog-footer .actions button{min-width:74px}
.management-page .invite-dialog{width:min(470px,calc(100% - 32px));padding:32px;border-radius:20px;border-color:#e3e9f3;box-shadow:0 30px 100px #18305229;text-align:center}
.invite-icon{margin:0 auto 15px;width:52px;height:52px;border-radius:16px}.invite-dialog h2{font-size:21px;margin:0 0 8px}.invite-dialog>p{font-size:13px;line-height:1.8}
.invite-link-box{text-align:left;background:#f6f8fc;border:1px solid #e7edf6;border-radius:12px;padding:15px 16px;margin:24px 0 10px}.invite-link-box>span{font-size:11px;color:#92a1b8}
.management-page #teachingInviteLink{background:none;padding:0;margin:7px 0 0;font-size:13px;line-height:1.7;color:#527bc2;word-break:break-all}
.invite-dialog p.invite-expiry{font-size:11px;color:#9ba8ba}.management-page .invite-dialog .actions{margin-top:26px;justify-content:center;flex-wrap:nowrap}
.management-page #teacherInviteFeedback{color:#35826b;font-size:12px}.management-page #teacherInviteFeedback:empty{display:none}
.management-page #managementDialog{border-color:#e3e9f3;border-radius:20px;padding:29px;box-shadow:0 30px 100px #18305229}.management-page #managementDialog h2{font-size:21px;margin:0 0 10px}.management-page #managementDialog p{font-size:13px;line-height:1.8;color:#8494ab}.management-page #managementDialog input{margin-top:13px;height:46px;border-color:#dce3ef;border-radius:10px;font-size:14px;background:#fbfcfe}.management-page #managementDialog .actions{margin-top:23px}
@media(max-width:900px){.management-page .protection-grid{gap:28px}.protection-footer>p span{display:none}.management-page .teaching-row>.actions{grid-template-columns:1fr}.management-page .teaching-row>.actions .danger-button{grid-column:auto}.management-page .protection-footer .actions{flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:720px){
 .management-page header.teaching-header{padding:18px 20px;min-height:77px}.management-page header.teaching-header nav{gap:16px;font-size:12px}.management-brand>span{display:none}.management-brand img{width:32px;height:32px}.management-brand strong{font-size:22px}
 .management-page main.teaching-main{padding:20px 18px 36px}.management-page-heading{margin-bottom:23px}.management-page-heading h1{font-size:27px}.management-private{display:none}
 .management-page .teaching-card{border-radius:15px;margin-bottom:18px}.management-page .teaching-panel-heading{padding:21px 20px;flex-direction:row;align-items:flex-start;gap:12px}.section-heading{gap:10px}.section-icon{width:37px;height:37px;border-radius:11px}.section-icon svg{width:20px;height:20px}.management-page .teaching-panel-heading h2{font-size:17px}.management-page .teaching-panel-heading p{font-size:12px;line-height:1.7}.management-page .teaching-panel-heading>button{font-size:12px;padding:8px 11px;min-height:37px;flex-shrink:0}.management-page .teaching-panel-heading>button svg{width:15px;height:15px}
 .management-page .protection-grid{grid-template-columns:1fr;padding:0 20px 22px;gap:23px}.protection-switches{gap:19px}.protection-footer{padding:17px 20px;flex-direction:column;align-items:stretch;gap:14px}.management-page .protection-footer .actions{justify-content:space-between}.management-page #policyFeedback{flex:1;max-width:none}.management-page .protection-footer .actions button{margin-left:auto}
 .management-page .teaching-row{padding:22px 20px;flex-direction:row;gap:12px;flex-wrap:wrap}.member-avatar{width:36px;height:36px;border-radius:11px;font-size:15px}.management-page .teaching-row .copy{flex-basis:calc(100% - 50px)}.management-page .teaching-row>.actions{display:flex;width:100%;margin:5px 0 0 48px;justify-content:flex-start;flex-wrap:wrap;gap:8px}.management-page .teaching-row>.actions .danger-button{margin-left:auto}.member-permissions{gap:5px}.member-permissions span{font-size:10px}
 .management-page .teaching-audit{padding:17px 20px;grid-template-columns:12px minmax(0,1fr);gap:10px}.audit-dot{margin-left:0}.management-page .teaching-audit time{grid-column:2;margin-top:-8px}.audit-content strong{font-size:12px}
 .management-page .member-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:18px}.member-dialog form{max-height:calc(100dvh - 26px)}.member-dialog-header{padding:20px;gap:11px}.member-dialog-header h2{font-size:20px}.member-dialog-header p{font-size:11px;max-width:235px}.member-dialog-header .section-icon{display:none}.member-dialog-body{padding:21px 20px 24px;scrollbar-gutter:auto}.member-section+.member-section{margin-top:22px;padding-top:21px}.member-info-grid{gap:14px}.member-section h3{font-size:13px}.member-section-heading .field-hint{font-size:10px}.room-choices{gap:8px;max-height:210px}.management-page .choice-card{font-size:12px;padding:10px;gap:8px}
 .permission-groups{grid-template-columns:1fr;gap:15px}.permission-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.permission-group legend{grid-column:1 / -1;float:none;padding-bottom:4px}.management-page .permission-group .choice-card{font-size:12px;min-height:42px}.management-page .teaching-preset{gap:7px;margin-bottom:20px}.management-page .teaching-preset>button{padding:10px 9px;min-height:59px}.teaching-preset strong{font-size:12px}.teaching-preset small{font-size:10px}.teaching-preset>button[aria-pressed=true]:after{top:8px;right:8px;width:4px;height:4px}
 .member-dialog-footer{padding:14px 20px;flex-wrap:wrap;gap:10px}.member-dialog-footer>div:first-child{width:100%;font-size:10px}.management-page .member-dialog-footer .actions{width:100%}.member-dialog-footer .actions button:first-child{flex:1}.member-dialog-footer .actions button.primary{flex:2}.management-page #teacherMemberFeedback{max-width:none}.management-page .invite-dialog{padding:28px 22px}.invite-dialog .actions button{font-size:12px;padding:10px 13px}.management-page .management-login{padding:30px 22px}
}
@media(max-width:400px){.member-info-grid{grid-template-columns:1fr;gap:15px}.room-choices{grid-template-columns:1fr;max-height:184px}.teaching-preset small{display:none}.management-page .teaching-preset>button{min-height:43px;padding:10px 8px}.member-section-heading{gap:8px}.management-page .teaching-panel-heading .section-icon{display:none}.management-page .teaching-row>.actions{margin-left:0}.management-page header.teaching-header nav{gap:12px}.management-page .teaching-panel-heading>button{padding:8px 9px}}
@media(prefers-reduced-motion:reduce){.management-page *{transition:none!important;scroll-behavior:auto!important}}
@media(min-width:721px) and (max-height:800px){
 .member-dialog-header{padding:18px 24px}.member-dialog-header .section-icon{width:39px;height:39px}.member-dialog-header h2{font-size:20px}.member-dialog-body{padding:18px 24px 22px}.member-section+.member-section{margin-top:17px;padding-top:17px}.member-section h3,.member-section-heading{margin-bottom:11px}.member-section-heading h3{margin-bottom:0}.management-page .management-field>input{height:42px;min-height:42px}.room-choices{gap:7px}.management-page .room-choices .choice-card{min-height:40px;padding:9px 11px}.management-page .teaching-preset{margin-bottom:14px}.management-page .teaching-preset>button{min-height:58px;padding:9px 12px}.permission-group{gap:6px}.permission-group legend{padding-bottom:5px}.management-page .permission-group .choice-card{min-height:37px;padding:8px 9px}.member-dialog-footer{padding:15px 24px}
}
@media(max-width:720px){.room-choices{max-height:none}.management-page .management-field>input{font-size:16px}.management-page .management-field>input::placeholder{font-size:13px}}
@media(min-width:721px) and (max-height:800px){
 .member-dialog-header{padding:14px 24px}.member-dialog-body{padding:16px 24px 18px}.member-section+.member-section{margin-top:14px;padding-top:14px}.member-section:first-child>h3{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.member-dialog-footer{padding:12px 24px}
}
@media(min-width:721px) and (max-height:800px){.member-section h3>span{display:none}.management-page .permission-group .choice-card{min-height:36px;padding:7px 9px}}
