/* ================================================================
   账号 / 角色 / 组织管理相关样式
   —— 与 styles.css 完全隔离：本文件只新增类名，不覆盖任何既有选择器，
      需要回退到"无角色版本"时，删掉这个 <link> 与两个 js 即可。
   变量（--primary / --secondary / --accent / --text / --text-light /
   --transition）沿用 styles.css 里定义的那套，保持视觉统一。
   ================================================================ */

/* ---------------------------------------------------------------- 登录页 */
.login-container .login-sub {
    margin-bottom: 6px;
}

.auth-panel {
    margin-top: 8px;
    text-align: left;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2px;
}

.auth-field {
    display: block;
}

.auth-field .af-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fbfdff;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 122, 90, 0.12);
}

.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-light);
    cursor: pointer;
    background: #f8fafc;
    border-radius: 12px;
    padding: 11px 14px;
}

.auth-consent input {
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.auth-consent a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.auth-consent a:hover {
    text-decoration: underline;
}

.auth-msg {
    font-size: 13px;
    min-height: 0;
    line-height: 1.6;
}

.auth-msg.error {
    color: #c0392b;
    background: #fdecea;
    border-radius: 10px;
    padding: 9px 13px;
}

.auth-msg.ok {
    color: #1e7a4a;
    background: #e8f7ef;
    border-radius: 10px;
    padding: 9px 13px;
}

.auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 3px;
}

.auth-submit:hover {
    background: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(44, 74, 122, 0.25);
}

.auth-links {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.auth-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.auth-links .sep {
    margin: 0 10px;
    color: #cbd5e0;
}

.auth-note {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-light);
    background: #f8fafc;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0;
}

.auth-note code,
.demo-account-box code,
.org-note code,
.org-hint code {
    background: #eef2f7;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12.5px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: #2c4a7a;
}

/* ---- 演示账号提示（正式部署时可整块删除） ---- */
.demo-account-box {
    margin-top: 22px;
    border-top: 1px dashed #dbe4ee;
    padding-top: 16px;
}

.demo-account-box .dab-title {
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-align: center;
}

.demo-account-box .dab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
}

.demo-account-box .dab-item {
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 9px 11px;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.demo-account-box .dab-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.demo-account-box .dab-role {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    border-radius: 20px;
    padding: 2px 9px;
    align-self: flex-start;
}

.demo-account-box .dab-item code {
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    padding: 0;
    color: var(--text);
}

.demo-account-box .dab-item em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--text-light);
}

.demo-account-box .dab-foot {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.7;
}

/* ---------------------------------------------------------------- 顶栏身份 */
#userNameDisplay {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.org-role-chip {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    border-radius: 20px;
    padding: 2px 9px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-role-chip.sm {
    font-size: 10.5px;
    padding: 1px 8px;
    margin-left: 0;
}

/* 顶栏专用的简短角色标签：藏蓝色描边、无填充色的轻量小框，配合简短
   角色名（"学生"而不是"班级学生"）使用，比原来各角色各自的实心色块
   更省宽度，也不需要在这个高频出现的位置上区分四种角色各自的颜色——
   账号管理表格那边的 .org-role-chip（实心色块+完整角色名）仍然保留，
   那边需要一眼分清不同角色，顶栏这里只需要"知道自己是什么角色"即可。 */
.org-role-chip-mini {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #1a3a6e;
    background: transparent;
    border: 1.5px solid #1a3a6e;
    border-radius: 20px;
    padding: 1px 8px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-scope-text {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 6px;
    white-space: nowrap;
}

.org-pwd-btn {
    margin-right: 4px;
}

/* ---------------------------------------------------------------- 顶栏导航"更多"折叠菜单 */
/* 角色权限越多（尤其系统管理员），顶栏导航项越多；与其让它们挤在一起
   自动换行破坏顶栏高度，不如超出可见宽度时收进一个"更多 ▾"下拉里。
   具体收纳几项由 org-patch.js 的 renderOrgNav() 按当前视口宽度动态计算，
   这里只负责下拉本身的外观。 */
.nav-more-wrap {
    position: relative;
    flex-shrink: 0;
}

.nav-more-btn {
    background: transparent;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-more-btn:hover,
.nav-more-btn.open {
    background: var(--bg);
    color: var(--text);
}

.nav-more-btn.has-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 42, 74, 0.2);
}

.nav-more-btn.has-active:hover {
    background: var(--primary);
    color: #fff;
}

.nav-more-btn .caret {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-more-btn.open .caret {
    transform: rotate(180deg);
}

.nav-more-menu {
    position: fixed;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    padding: 6px;
    min-width: 168px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 500;
}

.nav-more-menu button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
}

.nav-more-menu button:hover {
    background: var(--bg);
}

.nav-more-menu button.active {
    background: var(--primary);
    color: #fff;
}

/* ---------------------------------------------------------------- 班级切换条 */
.org-scope-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 32px;
    background: #f4f8fc;
    border-bottom: 1px solid #e3ecf5;
    font-size: 13px;
}

.org-scope-bar.hidden {
    display: none;
}

.org-scope-bar .osb-label {
    font-weight: 700;
    color: var(--primary);
}

.org-scope-bar .osb-class-switch,
.org-toolbar .osb-class-switch {
    display: inline-flex;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 24px;
    padding: 3px;
    gap: 2px;
}

.osb-class-switch button {
    border: none;
    background: transparent;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.osb-class-switch button:hover {
    color: var(--secondary);
}

.osb-class-switch button.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.org-scope-bar .osb-fixed {
    font-weight: 600;
    color: var(--text);
}

.org-scope-bar .osb-fixed em {
    font-style: normal;
    font-weight: 400;
    color: var(--text-light);
    font-size: 12px;
}

.org-scope-bar .osb-count {
    color: var(--text-light);
}

.org-scope-bar .osb-flag {
    margin-left: auto;
    background: #fff6e5;
    color: #a06008;
    border: 1px solid #f5dfb8;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: help;
}

/* ---------------------------------------------------------------- 通用页面骨架 */
.org-page-head {
    margin-bottom: 18px;
}

.org-page-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.org-page-head p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    max-width: 980px;
}

.org-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.org-tabs button {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-light);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.org-tabs button:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-tabs button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.org-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 16px;
}

.org-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.org-toolbar .ot-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.org-toolbar .ot-count {
    font-size: 13px;
    color: var(--text-light);
}

.org-toolbar select,
.org-toolbar input[type="text"] {
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    min-width: 160px;
}

.org-btn {
    border: 1px solid #dbe4ee;
    background: #fff;
    color: var(--text);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.org-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-btn.primary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    font-weight: 600;
}

.org-btn.primary:hover {
    filter: brightness(1.08);
    color: #fff;
}

.org-btn.danger {
    background: #fff;
    border-color: #f0c0bb;
    color: #c0392b;
}

.org-btn.danger:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.org-btn.tiny {
    padding: 5px 14px;
    font-size: 12.5px;
}

.org-mini {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-light);
    border-radius: 16px;
    padding: 4px 11px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    margin-left: 5px;
    transition: var(--transition);
}

.org-mini:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-mini.danger:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.org-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 14px;
    font-size: 14px;
}

.org-note {
    margin-top: 18px;
    padding: 14px 18px;
    background: #f8fafc;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--text-light);
}

.org-note.warn {
    background: #fff8ec;
    border-left-color: #e6a23c;
}

.org-perm-tip {
    margin: 10px 0 16px;
    padding: 11px 16px;
    background: #fff8ec;
    border-left: 4px solid #e6a23c;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.8;
    color: #8a5a10;
}

.org-perm-tip.owner {
    background: #eef6ff;
    border-left-color: var(--secondary);
    color: #2c4a7a;
}

.org-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.org-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.org-card-title span {
    font-weight: 400;
    font-size: 12.5px;
    color: var(--text-light);
    margin-left: 8px;
}

.org-card-foot {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ---------------------------------------------------------------- 表格 */
.org-table-wrap {
    overflow-x: auto;
}

.org-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.org-table th {
    text-align: left;
    padding: 11px 12px;
    background: #f4f8fc;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border-bottom: 1px solid #e3ecf5;
}

.org-table th:first-child {
    border-radius: 10px 0 0 0;
}

.org-table th:last-child {
    border-radius: 0 10px 0 0;
}

.org-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f4f8;
    color: var(--text);
    vertical-align: middle;
}

.org-table tbody tr:hover {
    background: #fafcfe;
}

.org-table td.cell-weak {
    color: #c0392b;
    font-weight: 600;
}

.org-table td.cell-strong {
    color: #1e7a4a;
    font-weight: 600;
}

.org-table code {
    background: #f4f6f9;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 12.5px;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.org-status {
    font-size: 12px;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

.org-status.on {
    background: #e8f7ef;
    color: #1e7a4a;
}

.org-status.off {
    background: #fdecea;
    color: #c0392b;
}

.org-status.warn {
    background: #fff6e5;
    color: #a06008;
}

.org-self-tag {
    font-size: 11px;
    color: var(--secondary);
    background: #e8f4ef;
    border-radius: 20px;
    padding: 1px 8px;
    margin-left: 6px;
}

.log-role {
    font-size: 11.5px;
    border-radius: 20px;
    padding: 2px 9px;
}

.log-role.user {
    background: #eef2f7;
    color: #2c4a7a;
}

.log-role.ai {
    background: #e8f4ef;
    color: #2c7a5a;
}

.log-tag {
    font-size: 11px;
    color: var(--text-light);
    margin-left: 5px;
}

.log-text {
    max-width: 520px;
    line-height: 1.7;
}

/* ---------------------------------------------------------------- 年级看板 */
.grade-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.grade-kpi-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-top: 4px solid var(--secondary);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.grade-kpi-card.top {
    border-top-color: #e6a23c;
    background: linear-gradient(180deg, #fffdf7 0%, #fff 60%);
}

.grade-kpi-card .gk-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.grade-kpi-card .gk-top {
    font-size: 11px;
    background: #e6a23c;
    color: #fff;
    border-radius: 20px;
    padding: 1px 9px;
    font-weight: 500;
}

.grade-kpi-card .gk-main {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 8px 0 4px;
}

.grade-kpi-card .gk-main span {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 8px;
}

.grade-kpi-card .gk-sub {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.grade-kpi-card .gk-flags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gk-flag {
    font-size: 11.5px;
    border-radius: 20px;
    padding: 2px 10px;
}

.gk-flag.strong {
    background: #e8f7ef;
    color: #1e7a4a;
}

.gk-flag.weak {
    background: #fdecea;
    color: #c0392b;
}

/* ---------------------------------------------------------------- 任务归属标记 */
.org-task-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12px;
}

.ots-badge {
    background: #eef2f7;
    color: #2c4a7a;
    border-radius: 20px;
    padding: 2px 10px;
}

.ots-badge.shared {
    background: #e8f4ef;
    color: #2c7a5a;
}

.ots-names {
    color: var(--text-light);
}

.org-grant-btn {
    border: 1px solid #cfe0d8 !important;
    color: #2c7a5a !important;
}

/* ---------------------------------------------------------------- 平台管理 */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.switch-text .sw-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.switch-text .sw-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 720px;
}

.org-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe4ee;
    background: #f4f6f9;
    border-radius: 30px;
    padding: 6px 16px 6px 8px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    flex-shrink: 0;
}

.org-switch .knob {
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: #cbd5e0;
    position: relative;
    transition: var(--transition);
}

.org-switch .knob::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: var(--transition);
}

.org-switch em {
    font-style: normal;
    font-size: 13px;
    color: var(--text-light);
}

.org-switch.on {
    border-color: #2c7a5a;
    background: #e8f7ef;
}

.org-switch.on .knob {
    background: #2c7a5a;
}

.org-switch.on .knob::after {
    left: 16px;
}

.org-switch.on em {
    color: #1e7a4a;
    font-weight: 600;
}

.stat-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.stat-box {
    flex: 1;
    min-width: 130px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px 18px;
    text-align: center;
}

.stat-box .sb-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .sb-label {
    font-size: 12.5px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.6;
}

.stat-box .sb-label em {
    font-style: normal;
    font-size: 11.5px;
}

/* ---------------------------------------------------------------- AI 知识库 */
.kb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kb-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #edf2f7;
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    padding: 14px 18px;
}

.kb-item .kb-icon {
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}

.kb-item .kb-main {
    flex: 1;
    min-width: 0;
}

.kb-item .kb-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.kb-item .kb-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.kb-item .kb-cat {
    background: #eef2f7;
    color: #2c4a7a;
    border-radius: 20px;
    padding: 1px 10px;
}

.kb-item .kb-preview {
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-item .kb-actions {
    flex-shrink: 0;
}

.kb-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text);
    max-height: 55vh;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    font-family: inherit;
}

/* ---------------------------------------------------------------- 自有弹窗 */
.org-modal-box {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.org-modal-box.wide {
    max-width: 820px;
}

.org-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px 16px;
    border-bottom: 1px solid #edf2f7;
}

.org-modal-head h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.org-modal-x {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.org-modal-x:hover {
    color: #c0392b;
    transform: rotate(90deg);
}

.org-modal-body {
    padding: 22px 28px;
    overflow-y: auto;
}

.org-modal-foot {
    padding: 16px 28px 22px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.org-modal-msg {
    font-size: 13px;
    line-height: 1.7;
    color: #c0392b;
}

.org-modal-msg.ok {
    color: #1e7a4a;
}

.org-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.org-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.org-field input[type="text"],
.org-field input[type="password"],
.org-field select,
.org-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fbfdff;
    box-sizing: border-box;
}

.org-field textarea {
    resize: vertical;
    line-height: 1.8;
}

/* 教师/组长"任教班级"多选复选框组——一名教师可以勾多个班，也可以
   一个都不勾（比如只统管年级、不直接任教的组长）。样式上和工具勾选框
   用同一套"胶囊+选中变色"的视觉语言，保持整站一致，不用原生方框复选框。 */
.org-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.org-checkbox-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text-light);
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 18px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}
.org-checkbox-item:hover {
    border-color: var(--primary);
}
.org-checkbox-item:has(input:checked) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.org-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.org-field input:focus,
.org-field select:focus,
.org-field textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

.org-field input:disabled {
    background: #f4f6f9;
    color: var(--text-light);
}

.org-field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.org-hint {
    font-size: 12.5px;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    line-height: 1.8;
}

.org-check-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.org-check,
.org-radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    line-height: 1.8;
}

.org-radio {
    margin-bottom: 8px;
}

.org-radio input {
    margin-top: 5px;
    flex-shrink: 0;
}

.auth-doc-p {
    margin: 0 0 12px;
    line-height: 1.95;
    font-size: 13.5px;
    color: var(--text);
}
