/* 校宝系统 公共样式（ruoyi 风格） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", -apple-system, sans-serif; background: #f0f2f5; color: #303133; font-size: 14px; }
a { text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 200px; background: #304156; color: #bfcbd9; display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; }
.logo { height: 56px; line-height: 56px; text-align: center; color: #fff; font-size: 17px; font-weight: bold; background: #2b3648; letter-spacing: 2px; }
.sidebar nav a { display: block; padding: 0 20px; height: 46px; line-height: 46px; color: #bfcbd9; cursor: pointer; font-size: 14px; }
.sidebar nav a .menu-icon { display: inline-block; width: 26px; margin-right: 4px; text-align: center; font-size: 15px; }
.sidebar nav a:hover { background: #263445; color: #fff; }
.sidebar nav a.active { background: #4a90e2 !important; color: #fff; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-footer a { color: #9fb6dd; cursor: pointer; }

/* 主区域 */
.main { flex: 1; margin-left: 200px; display: flex; flex-direction: column; min-width: 0; }
.navbar { height: 56px; background: #fff; box-shadow: 0 1px 4px rgba(0,21,41,.08); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 10; }
.navbar .crumb { font-size: 15px; color: #303133; }
.navbar .crumb .sep { color: #97a8be; margin: 0 6px; }
.navbar .user-box { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #606266; }
.navbar .user-box .avatar { width: 32px; height: 32px; border-radius: 50%; background: #4a90e2; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.navbar .user-box a { color: #606266; }
.navbar .user-box a:hover { color: #4a90e2; }
.content { padding: 18px 22px; flex: 1; }

/* 搜索栏 */
.search-bar { background: #fff; border-radius: 4px; padding: 16px 16px 0; box-shadow: 0 1px 4px rgba(0,21,41,.06); margin-bottom: 14px; }
.search-bar .items { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.search-bar label { color: #606266; font-size: 13px; }
.search-bar .ops { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0 14px; }

/* 表格面板 */
.panel { background: #fff; border-radius: 4px; padding: 16px; box-shadow: 0 1px 4px rgba(0,21,41,.06); }
.panel .panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel .panel-head .title { font-size: 15px; font-weight: bold; color: #303133; }

input, select { padding: 7px 11px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; outline: none; color: #606266; background: #fff; }
input:focus, select:focus { border-color: #4a90e2; }

.btn { padding: 8px 15px; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: #606266; }
.btn:hover { color: #4a90e2; border-color: #c6e2ff; background: #ecf5ff; }
.btn.primary { background: #4a90e2; border-color: #4a90e2; color: #fff; }
.btn.primary:hover { background: #66a6ea; border-color: #66a6ea; color: #fff; }
.btn.success { color: #67c23a; border-color: #c2e7b0; background: #f0f9eb; }
.btn.danger { color: #f56c6c; border-color: #fbc4c4; background: #fef0f0; }
.btn.warning { color: #e6a23c; border-color: #f5dab1; background: #fdf6ec; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ebeef5; font-size: 13px; }
.tbl th { background: #f8f8f9; color: #515a6e; font-weight: 600; white-space: nowrap; }
.tbl tbody tr:hover { background: #f5f7fa; }
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin-right: 6px; }

.tag { display: inline-block; padding: 1px 9px; border-radius: 3px; font-size: 12px; background: #ecf5ff; color: #4a90e2; border: 1px solid #d9ecff; margin: 1px 4px 1px 0; }
.tag.success { background: #f0f9eb; color: #67c23a; border-color: #e1f3d8; }
.tag.danger { background: #fef0f0; color: #f56c6c; border-color: #fde2e2; }
.tag.warning { background: #fdf6ec; color: #e6a23c; border-color: #faecd8; }
.muted { color: #909399; font-size: 12px; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: flex-end; margin: 14px 0 2px; align-items: center; }
.pager button { min-width: 30px; padding: 5px 9px; font-size: 13px; }
.pager button.cur { background: #4a90e2; color: #fff; border-color: #4a90e2; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 100; overflow-y: auto; padding: 8vh 0; }
.modal { background: #fff; border-radius: 6px; padding: 20px 24px; width: 520px; max-width: 94vw; }
.modal h3 { font-size: 16px; margin-bottom: 18px; color: #303133; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid #ebeef5; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; color: #606266; font-size: 13px; }
.field input, .field select { width: 100%; }
.field .req::after { content: " *"; color: #f56c6c; }
.check-list { max-height: 240px; overflow-y: auto; border: 1px solid #ebeef5; border-radius: 4px; padding: 6px; }
.check-list label { display: flex; gap: 8px; padding: 6px 4px; align-items: center; margin: 0; }
.check-list label:hover { background: #f5f7fa; }

.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8;
  padding: 10px 22px; border-radius: 4px; z-index: 200; max-width: 70vw; font-size: 13px; }
.toast.err { background: #fef0f0; color: #f56c6c; border-color: #fde2e2; }
