/* ========== 账号会员授权系统 独立样式（不依赖任何外部资源） ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; background: #f0f2f5; color: #2c3e50; }
a { text-decoration: none; color: inherit; }
code { font-family: Consolas, Menlo, monospace; }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; width: 380px; padding: 38px 34px 26px; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.25); }
.login-logo { text-align: center; font-size: 40px; }
.login-card h1 { text-align: center; font-size: 20px; margin-top: 10px; }
.login-sub { text-align: center; color: #95a5a6; font-size: 12px; letter-spacing: 1px; margin-bottom: 24px; }
.login-card label { display: block; font-size: 13px; color: #666; margin: 12px 0 6px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: #2a5298; }
.login-foot { text-align: center; color: #b2babb; font-size: 12px; margin-top: 20px; }

/* ---------- 通用控件 ---------- */
.btn { display: inline-block; padding: 9px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; transition: opacity .15s; background: #f4f4f5; color: #606266; border: 1px solid #dcdfe6; }
.btn:hover { opacity: .85; }
.btn-primary { background: #2a5298; color: #fff; border-color: #2a5298; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-warn { background: #e67e22; color: #fff; border-color: #e67e22; }
.btn-default { background: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn-block { width: 100%; margin-top: 22px; padding: 11px; font-size: 15px; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #fdecea; border: 1px solid #f5c6cb; color: #a93226; }
.alert-ok { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }
.alert-warn { background: #fff8e1; border: 1px solid #ffe082; color: #8d6e63; }

/* ---------- 顶栏 ---------- */
.topbar { background: #1e2c3f; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 30px; }
.brand { font-size: 16px; font-weight: bold; white-space: nowrap; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 6px 14px; border-radius: 6px; font-size: 14px; color: #c8d3e0; }
.topnav a.active, .topnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.who { color: #aebdcf; font-size: 13px; }
.topbar-right .btn { color: #dfe7f0; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.topnav .nav-status { color: #ffd98a; }
.topnav .nav-status:hover { background: rgba(255,255,255,.12); color: #ffe9b8; }
.topbar-right .btn-add { background: #27ae60 !important; color: #fff !important; border-color: #27ae60 !important; font-weight: bold; }
.topbar-right .btn-add:hover { background: #229954 !important; }
.btn-add .plus { font-size: 15px; font-weight: bold; margin-right: 2px; }

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 22px auto; padding: 0 24px; }
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px 22px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-n { font-size: 28px; font-weight: bold; color: #2a5298; }
.stat-l { color: #95a5a6; font-size: 13px; margin-top: 4px; }
.c-gray { color: #7f8c8d; } .c-green { color: #2e7d32; } .c-red { color: #c0392b; } .c-orange { color: #e67e22; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } .stat-row { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2,1fr); } .topbar-inner { gap:12px; } .who { display:none; } }

.panel { background: #fff; border-radius: 10px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.head-state { font-size: 13px; color: #7f8c8d; white-space: nowrap; }
.list-count { font-size: 13px; color: #7f8c8d; white-space: nowrap; }
.list-count a { color: #2a5298; }
.panel-desc { color: #7f8c8d; font-size: 12.5px; line-height: 1.7; margin-bottom: 14px; }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-item { display: flex; flex-direction: column; gap: 5px; flex: 1 1 150px; min-width: 140px; }
.filter-item label { font-size: 12px; color: #7f8c8d; }
.filter-item input, .filter-item select {
    width: 100%; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff;
}
.filter-item input:focus, .filter-item select:focus { outline: none; border-color: #2a5298; }
.filter-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.filter-actions .btn { padding: 8px 20px; }
.search-ico { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; margin-right: 6px; position: relative; vertical-align: -1px; }
.search-ico::after { content: ''; position: absolute; width: 6px; height: 2px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); }
@media (max-width: 640px) { .filter-actions { flex: 1 1 100%; } .filter-actions .btn { flex: 1; } }

/* ---------- 表单 ---------- */
.form label { display: block; font-size: 13px; color: #555; margin: 12px 0 6px; }
.form input[type=text], .form input[type=password], .form input[type=date], .form input[type=tel], .form textarea, .form select {
    width: 100%; padding: 9px 11px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; font-family: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: #2a5298; }
.form .btn-primary { margin-top: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.req { color: #e74c3c; margin-left: 2px; }
.help { color: #95a5a6; font-size: 12px; margin-top: 4px; line-height: 1.5; min-height: 18px; }
.check-cell { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; min-height: 37px; padding: 9px 11px; border: 1px dashed #dcdfe6; border-radius: 6px; cursor: pointer; background: #fafbfc; }
.check-cell input { width: 16px !important; height: 16px; }

/* 表单底部操作栏（保存 + 危险操作分区） */
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f2; }
.form-foot .foot-right { display: flex; gap: 8px; flex-wrap: wrap; }
.form-foot .foot-left { display: flex; gap: 8px; flex-wrap: wrap; }
#orgEditBtn, #orgCancelBtn { margin-top: 0; }
#orgCancelBtn { display: none; }

/* ---------- 学校详情：超管资料扁平只读表单 ---------- */
.org-flat .form label { margin-top: 8px; }
.org-flat .form-row { grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.org-flat .span-2 { grid-column: span 2; }
.org-flat .check-inline { display: flex; gap: 10px; }
.org-flat .check-inline .check-cell { flex: 1; margin: 0; }
#orgForm input:disabled, #orgForm select:disabled { background: #f5f6f8; color: #6b7280; cursor: not-allowed; }
#orgForm .check-cell:has(input:disabled) { opacity: .72; cursor: not-allowed; }
@media (max-width: 1000px) { .org-flat .form-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .org-flat .form-row { grid-template-columns: 1fr; }
    .org-flat .span-2 { grid-column: span 1; }
    .org-flat .check-inline { flex-direction: column; }
}

/* 绿色添加按钮（顶栏之外的页面内位置） */
.btn-add { background: #27ae60; color: #fff; border-color: #27ae60; font-weight: bold; }
.btn-add:hover { background: #229954; border-color: #229954; opacity: 1; }

/* ---------- 弹窗 ---------- */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(30,44,63,.55); z-index: 1000; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: modalIn .18s ease; }
@keyframes modalIn { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid #eef0f2; }
.modal-head h3 { margin: 0; font-size: 16px; color: #2c3e50; }
.modal-x { border: none; background: #f4f4f5; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; color: #7f8c8d; cursor: pointer; }
.modal-x:hover { background: #e4e7eb; color: #2c3e50; }
.modal-body { padding: 20px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f2; }
.status-help { list-style: none; margin: 0; padding: 0; }
.status-help li { position: relative; padding: 8px 0 8px 20px; font-size: 13px; color: #555; line-height: 1.7; border-bottom: 1px dashed #eef0f2; }
.status-help li:last-child { border-bottom: none; }
.status-help li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: #2a5298; }

/* ---------- 列表 ---------- */
.filters { margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef0f2; white-space: nowrap; }
.data-table th { background: #fafbfc; color: #7f8c8d; font-weight: normal; font-size: 12.5px; }
.data-table tbody tr:hover { background: #f8fafc; }
.nowrap { white-space: nowrap; }
.muted { color: #b2babb; }
.empty { text-align: center; color: #b2babb; padding: 36px 0 !important; }
.pager { margin-top: 14px; display: flex; gap: 6px; }

.badge { display:inline-block; padding:2px 10px; border-radius:12px; font-size:12px; }
.badge-green { color:#2e7d32; background:#e8f5e9; }
.badge-red { color:#a93226; background:#fdecea; }
.badge-gray { color:#7f8c8d; background:#f4f4f5; }
.badge-orange { color:#b35c00; background:#fff3e0; }
.badge-blue { color:#2a5298; background:#e8eef7; }

/* 铃声系统绑定状态行 */
.bell-bind-row { display:flex; align-items:center; gap:10px; margin-top:14px; padding:10px 14px; background:#f7f8fa; border:1px solid #eef0f3; border-radius:8px; font-size:13px; }
.bell-bind-label { color:#6c7a86; font-weight:600; min-width:64px; }
.bell-bind-time { color:#95a5a6; font-size:12.5px; }

.ops-row { display:flex; gap:6px; flex-wrap:wrap; }
.crumb { margin-bottom: 14px; font-size: 13px; color: #7f8c8d; }
.crumb a { color: #2a5298; }
.school-cell { white-space: normal; min-width: 150px; }
.section-title { margin: 22px 0 10px; font-size: 15px; font-weight: bold; }
