/* ============================================================
   伟贤大学网上服务平台 - 全局样式（蓝色主题）
   主色可在后台「站点设置」中修改，运行时通过 CSS 变量注入
   ============================================================ */
:root {
  --primary: #1a5fb4;
  --primary-dark: #0f3d7a;
  --primary-light: #e8f0fb;
  --primary-hover: #1751a0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #8a94a6;
  --border: #e4e9f2;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(26, 95, 180, .07);
  --shadow-lg: 0 8px 30px rgba(26, 95, 180, .13);
  --max: 1260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hide { display: none !important; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 顶部条 ---------------- */
.topbar { background: var(--primary-dark); color: #cfe0f7; font-size: 12.5px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar a { color: #cfe0f7; margin-left: 18px; }
.topbar a:hover { color: #fff; }

/* ---------------- 头部 ---------------- */
.header { background: linear-gradient(105deg, var(--primary-dark), var(--primary) 55%, #2a7fd4); color: #fff; }
.header .wrap { display: flex; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.logo-box { display: flex; align-items: center; gap: 14px; }
.logo-box img { height: 56px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }
.logo-txt h1 { font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.logo-txt p { font-size: 11.5px; opacity: .75; letter-spacing: .6px; margin-top: 2px; }
.header .search { margin-left: auto; display: flex; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); border-radius: 30px; overflow: hidden; }
.header .search input { background: transparent; border: 0; color: #fff; padding: 9px 18px; width: 230px; }
.header .search input::placeholder { color: rgba(255,255,255,.7); }
.header .search button { background: #fff; color: var(--primary); border: 0; padding: 0 20px; cursor: pointer; font-weight: 600; }
.header .user-area { display: flex; align-items: center; gap: 10px; }
.btn-login { background: #fff; color: var(--primary); padding: 8px 22px; border-radius: 30px; font-weight: 600; font-size: 13.5px; }
.btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; padding: 7px 18px; border-radius: 30px; font-size: 13.5px; }

/* ---------------- 主导航 ---------------- */
.mainnav { background: var(--primary); border-top: 1px solid rgba(255,255,255,.15); }
.mainnav .wrap { display: flex; }
.mainnav a { color: #fff; padding: 13px 26px; font-size: 15px; position: relative; }
.mainnav a:hover, .mainnav a.on { background: rgba(0,0,0,.14); }
.mainnav a.on::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 3px; background: #ffd166; }

/* ---------------- 横幅 ---------------- */
.hero { background: linear-gradient(120deg, #0f3d7a, #1a5fb4 60%, #3d8be0); color: #fff; padding: 54px 0 64px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; right: -120px; top: -80px; width: 460px; height: 460px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero::after { content: ''; position: absolute; right: 90px; bottom: -160px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.05); }
.hero h2 { font-size: 34px; font-weight: 700; letter-spacing: 2px; }
.hero p { margin-top: 12px; font-size: 16px; opacity: .88; }
.hero .bigsearch { margin-top: 28px; display: flex; max-width: 620px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero .bigsearch input { flex: 1; border: 0; padding: 15px 20px; font-size: 15px; }
.hero .bigsearch button { background: #ffd166; color: #4a3000; border: 0; padding: 0 34px; font-size: 15px; font-weight: 600; cursor: pointer; }
.hero .tags { margin-top: 14px; font-size: 13px; opacity: .85; }
.hero .tags a { margin-right: 14px; border-bottom: 1px dashed rgba(255,255,255,.5); }
.hero-stat { position: absolute; right: 40px; top: 60px; display: flex; gap: 30px; }
.hero-stat div { text-align: center; }
.hero-stat b { font-size: 30px; display: block; }
.hero-stat span { font-size: 12.5px; opacity: .8; }

/* ---------------- 滚动通知 ---------------- */
.marquee { background: #fff8e6; border-bottom: 1px solid #f3e2b8; color: #8a6100; }
.marquee .wrap { display: flex; align-items: center; gap: 10px; height: 42px; font-size: 13.5px; }
.marquee .tag { background: var(--warning); color: #fff; padding: 1px 9px; border-radius: 3px; font-size: 12px; flex-shrink: 0; }
.marquee p { overflow: hidden; white-space: nowrap; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 44px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.sec-head h3 { font-size: 22px; position: relative; padding-left: 14px; }
.sec-head h3::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--primary); }
.sec-head .en { font-size: 12px; color: var(--text-3); margin-left: 10px; letter-spacing: 1px; text-transform: uppercase; }
.sec-head a { color: var(--text-3); font-size: 13px; }
.sec-head a:hover { color: var(--primary); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: #fff; border: 1px solid var(--border); color: var(--text-2); padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 13px; }
.tabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- 服务卡片 ---------------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.svc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; text-align: center; cursor: pointer; transition: .2s; position: relative; }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #bcd6f5; }
.svc-card .ic { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.svc-card h4 { font-size: 15px; font-weight: 600; }
.svc-card p { font-size: 12px; color: var(--text-3); margin-top: 6px; height: 34px; overflow: hidden; }
.svc-card .hot { position: absolute; right: 10px; top: 10px; background: #ffefef; color: var(--danger); font-size: 11px; padding: 1px 7px; border-radius: 10px; }

/* ---------------- 卡片 ---------------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h4 { font-size: 16px; }
.card-body { padding: 18px 20px; }

/* ---------------- 公告列表 ---------------- */
.news-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.news-list li:last-child { border-bottom: 0; }
.news-list .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.news-list a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list a:hover { color: var(--primary); }
.news-list time { color: var(--text-3); font-size: 12.5px; flex-shrink: 0; }
.badge-top { background: var(--danger); color: #fff; font-size: 11px; padding: 0 6px; border-radius: 3px; }

/* ---------------- 按钮 ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--primary); color: #fff; border: 1px solid var(--primary); padding: 8px 18px; border-radius: 6px; cursor: pointer; font-size: 13.5px; transition: .15s; }
.btn:hover { background: var(--primary-hover); }
.btn.line { background: #fff; color: var(--primary); }
.btn.line:hover { background: var(--primary-light); }
.btn.gray { background: #fff; color: var(--text-2); border-color: var(--border); }
.btn.gray:hover { background: #f6f8fb; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.success { background: var(--success); border-color: var(--success); }
.btn.sm { padding: 4px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------- 表单 ---------------- */
.form-item { margin-bottom: 16px; }
.form-item > label { display: block; margin-bottom: 6px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.form-item .req { color: var(--danger); margin-right: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,95,180,.1); }
.textarea { min-height: 92px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; }
.radio-group label, .check-group label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13.5px; }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { background: #f7f9fc; color: var(--text-2); font-weight: 600; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.table tbody tr:hover { background: #fafcff; }
.table .op a { color: var(--primary); margin-right: 10px; cursor: pointer; }
.table .op a.del { color: var(--danger); }
.table-wrap { overflow-x: auto; }

/* ---------------- 状态标签 ---------------- */
.tag { display: inline-block; padding: 1px 9px; border-radius: 11px; font-size: 12px; border: 1px solid transparent; }
.tag.blue { background: var(--primary-light); color: var(--primary); }
.tag.green { background: #e7f8ed; color: var(--success); }
.tag.orange { background: #fff3e2; color: var(--warning); }
.tag.red { background: #fdecec; color: var(--danger); }
.tag.gray { background: #f1f3f7; color: var(--text-3); }
.tag.cyan { background: #e2f6fa; color: var(--info); }

/* ---------------- 页脚 ---------------- */
.footer { background: #10294a; color: #9fb4d0; padding: 34px 0 22px; margin-top: 40px; font-size: 13px; }
.footer .cols { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer h5 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer a { color: #9fb4d0; }
.footer a:hover { color: #fff; }
.footer .links a { margin-right: 16px; }
.footer .copy { text-align: center; padding-top: 18px; line-height: 2; font-size: 12.5px; }
.footer .copy a { text-decoration: underline; }

/* ---------------- 控制台布局 ---------------- */
.console { display: flex; min-height: 100vh; }
.side { width: 226px; background: #0f2f5c; color: #c3d5ee; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.side .brand img { height: 32px; }
.side .brand b { color: #fff; font-size: 15.5px; }
.side .menu { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.side .menu::-webkit-scrollbar { width: 5px; }
.side .menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.side .grp { padding: 14px 18px 6px; font-size: 11.5px; color: #7d99bf; letter-spacing: 1px; }
.side .menu a { display: flex; align-items: center; gap: 9px; padding: 9px 18px; font-size: 13.8px; cursor: pointer; border-left: 3px solid transparent; }
.side .menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side .menu a.on { background: rgba(255,255,255,.11); color: #fff; border-left-color: #ffd166; }
.side .menu a .n { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; padding: 0 6px; border-radius: 9px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topnav { height: 58px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 22px; gap: 14px; position: sticky; top: 0; z-index: 20; }
.topnav .title { font-size: 17px; font-weight: 600; }
.topnav .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.content { padding: 20px 22px 40px; flex: 1; }

/* 视图内多列布局：用 class 而非内联，便于移动端塌成单列（避免缩放） */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-dash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid-dash2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.grid-form { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.grid-forum { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-portal { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--primary-light); color: var(--primary); }
.stat b { font-size: 24px; display: block; line-height: 1.25; }
.stat span { font-size: 12.5px; color: var(--text-3); }

/* ---------------- 概览条形图 ---------------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.bar-row .bl { width: 132px; color: var(--text-2); flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bt { height: 14px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 4px; flex: none; min-width: 2px; transition: width .4s; }
.bar-row b { color: var(--text-1); }

/* ---------------- 工具栏 ---------------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .muted { margin-left: auto; }

/* ---------------- 表单两列 ---------------- */
.form.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form.two > label { display: block; }
.form .fi { margin-top: 4px; }

/* ---------------- 开关 / 色值 / 上传 ---------------- */
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.cval { width: 90px; }
.up { display: flex; gap: 8px; }
.up input { flex: 1; }

/* ---------------- 模态框 ---------------- */
.mask { position: fixed; inset: 0; background: rgba(15,32,60,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 900px; }
.modal.small { max-width: 420px; }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h4 { font-size: 16.5px; }
.modal-head .x { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- 提示 ---------------- */
.toast-box { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #223; color: #fff; padding: 9px 20px; border-radius: 6px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: tin .25s; }
.toast.ok { background: var(--success); } .toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(-12px); } }

/* ---------------- 时间线 ---------------- */
.timeline { padding-left: 6px; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.timeline li.done::before { border-color: var(--success); }
.timeline li.rej::before { border-color: var(--danger); }
.timeline b { font-size: 13.8px; }
.timeline .t { font-size: 12px; color: var(--text-3); }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty .ic { font-size: 42px; opacity: .35; margin-bottom: 10px; }

/* ---------------- 登录页 ---------------- */
.login-page { min-height: 100vh; display: flex; background: linear-gradient(125deg, #0d2b52, #14498f 45%, #2b7ad0); position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%; background: rgba(255,255,255,.045); left: -180px; bottom: -260px; }
.login-page::after { content: ''; position: absolute; width: 440px; height: 440px; border-radius: 50%; background: rgba(255,255,255,.05); right: 10%; top: -160px; }
.login-left { flex: 1; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 0 8%; z-index: 2; }
.login-left .lg { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-left .lg img { height: 62px; }
.login-left h1 { font-size: 36px; letter-spacing: 3px; }
.login-left h2 { font-size: 19px; font-weight: 400; opacity: .85; margin-top: 12px; letter-spacing: 1px; }
.login-left ul { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0,190px)); gap: 12px; }
.login-left ul li { background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.login-box { width: 430px; background: #fff; margin: auto 6% auto 0; border-radius: 14px; padding: 34px 36px; box-shadow: 0 24px 70px rgba(0,0,0,.28); z-index: 2; }
.login-box h3 { font-size: 21px; text-align: center; }
.login-box .sub { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 6px; margin-bottom: 22px; }
.role-tabs { display: flex; background: #f1f4f9; border-radius: 8px; padding: 4px; margin-bottom: 22px; }
.role-tabs button { flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 14px; }
.role-tabs button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.09); }
.login-box .ipt { position: relative; margin-bottom: 15px; }
.login-box .ipt .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 17px; }
.login-box .ipt input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.login-box .ipt input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,95,180,.1); }
.login-box .btn { padding: 12px; font-size: 15px; border-radius: 8px; }
.login-tip { background: var(--primary-light); color: var(--primary-dark); font-size: 12.5px; padding: 10px 13px; border-radius: 7px; margin-top: 18px; line-height: 1.7; }
.demo-accounts { margin-top: 14px; font-size: 12.5px; color: var(--text-3); text-align: center; line-height: 1.9; }
.demo-accounts b { color: var(--primary); cursor: pointer; }

/* ---------------- 地图 ---------------- */
.map-canvas { position: relative; width: 100%; padding-top: 62%; background:
  linear-gradient(#dff0e0 0 0) padding-box, #eaf3ea; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.map-canvas .inner { position: absolute; inset: 0; }
.map-pin { position: absolute; transform: translate(-50%, -100%); cursor: pointer; text-align: center; }
.map-pin .p { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); box-shadow: 0 2px 6px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.map-pin .p svg { transform: rotate(45deg); color: #fff; font-size: 13px; }
.map-pin span { display: inline-block; margin-top: 3px; background: rgba(255,255,255,.94); border: 1px solid var(--border); padding: 0 6px; border-radius: 4px; font-size: 11.5px; white-space: nowrap; }
.map-pin:hover .p { background: var(--danger); }

/* ---------------- 论坛 ---------------- */
.thread-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.thread-item:hover .tt { color: var(--primary); }
.thread-item .av { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.thread-item .tt { font-size: 15.5px; font-weight: 500; }
.thread-item .meta { font-size: 12.5px; color: var(--text-3); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.post { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--border); }

/* ---------------- 课表 ---------------- */
.timetable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.timetable th, .timetable td { border: 1px solid var(--border); padding: 6px; text-align: center; height: 56px; vertical-align: middle; }
.timetable th { background: #f7f9fc; height: 38px; }
.timetable .cls { background: var(--primary-light); color: var(--primary-dark); border-radius: 5px; padding: 4px; line-height: 1.4; }

/* ---------------- 发票 ---------------- */
.invoice { background: #fff; padding: 30px; border: 1px solid #ccc; max-width: 760px; margin: 0 auto; font-family: "SimSun", serif; }
.invoice h2 { text-align: center; font-size: 24px; letter-spacing: 6px; margin-bottom: 6px; }
.invoice .no { text-align: right; font-size: 13px; color: #a33; }
.invoice table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice table td, .invoice table th { border: 1px solid #333; padding: 9px 10px; font-size: 13.5px; }
.invoice .seal-cell { width: 130px; text-align: center; vertical-align: middle; }
.invoice .seal { display: inline-flex; align-items: center; justify-content: center; color: #c00; border: 2px solid #c00; border-radius: 50%; width: 104px; height: 104px; text-align: center; font-size: 13px; transform: rotate(-14deg); opacity: .85; }
.invoice .seal img { display: block; width: 104px; height: 104px; border-radius: 50%; object-fit: contain; opacity: .85; }
.invoice .seal.noimg::before { content: attr(data-name) "\A" "财务专用章"; white-space: pre; line-height: 1.5; }
@media print {
  body * { visibility: hidden; }
  .invoice, .invoice * { visibility: visible; }
  .invoice { position: absolute; left: 0; top: 0; border: 0; }
}

/* ---------------- 后台专用 ---------------- */
.admin-body { background: #f1f4f9; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 160px; }
.pager { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 0 0; }
.pager button { border: 1px solid var(--border); background: #fff; padding: 5px 12px; border-radius: 5px; cursor: pointer; }
.pager button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr 1.6fr 70px 60px; gap: 8px; align-items: center; margin-bottom: 8px; }
.field-row input, .field-row select { padding: 6px 9px; border: 1px solid var(--border); border-radius: 5px; width: 100%; }
.flow-row { display: grid; grid-template-columns: 1.4fr 1.4fr 60px; gap: 8px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-light); color: var(--primary); border-radius: 14px; padding: 2px 10px; font-size: 12.5px; margin: 0 6px 6px 0; }
.chip i { cursor: pointer; font-style: normal; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart .b i { width: 100%; max-width: 42px; background: linear-gradient(180deg, #4d94e6, var(--primary)); border-radius: 4px 4px 0 0; display: block; }
.bar-chart .b span { font-size: 11.5px; color: var(--text-3); }

/* ============================================================
   表单控件全局美化
   使用 :where() 保持 0 特异性，任何已有的具名样式都可覆盖它
   ============================================================ */
:where(
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]):not([type=submit]):not([type=button]):not([type=image]),
  select, textarea
) {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13.8px;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s, background .15s;
  appearance: none;
  -webkit-appearance: none;
}
:where(input, select, textarea)::placeholder { color: #aab3c2; }
:where(input, select, textarea):hover:not(:disabled) { border-color: #c3d4ec; }
:where(input, select, textarea):focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, .12);
  background: #fff;
}
:where(input, select, textarea):disabled,
:where(input, select, textarea)[readonly] { background: #f5f7fa; color: var(--text-3); cursor: not-allowed; }
:where(textarea) { min-height: 92px; resize: vertical; line-height: 1.7; }

/* 下拉箭头 */
:where(select) {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
select.input, select.select { padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; cursor: pointer; }

/* 勾选框 / 单选框 */
input[type=checkbox], input[type=radio] {
  width: 16px; height: 16px; margin: 0; flex: none;
  accent-color: var(--primary);
  cursor: pointer; vertical-align: -3px;
}

/* 文件选择 */
input[type=file] {
  width: 100%; padding: 7px 10px; border: 1px dashed #c3d4ec; border-radius: 8px;
  background: #fbfdff; color: var(--text-2); font-size: 13px; cursor: pointer;
}
input[type=file]:hover { border-color: var(--primary); background: var(--primary-light); }
input[type=file]::file-selector-button {
  border: 0; background: var(--primary); color: #fff; padding: 6px 14px;
  border-radius: 6px; margin-right: 12px; cursor: pointer; font-size: 13px;
}
input[type=file]::file-selector-button:hover { background: var(--primary-hover); }

/* 颜色选择 */
input[type=color] {
  width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; cursor: pointer; flex: none;
}

/* 数字框去掉浏览器加减箭头（保留键盘输入） */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 带图标的输入框 */
.ipt-icon { position: relative; }
.ipt-icon > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 16px; pointer-events: none; }
.ipt-icon > input { padding-left: 36px; }

/* 尺寸修饰 */
.input.sm, .select.sm, input.sm, select.sm { padding: 6px 10px; font-size: 13px; border-radius: 6px; }
.inline-w { width: auto; min-width: 150px; display: inline-block; }

/* 开关（勾选框变滑块） */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sl { width: 40px; height: 22px; border-radius: 22px; background: #cbd5e1; position: relative; transition: .2s; flex: none; }
.switch .sl::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .sl { background: var(--primary); }
.switch input:checked + .sl::after { transform: translateX(18px); }

/* 勾选项卡片（权限勾选、批量选择） */
.check-card { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; cursor: pointer; background: #fff; transition: .15s; }
.check-card:hover { border-color: #bcd6f5; background: #fbfdff; }
.check-card.on { border-color: var(--primary); background: var(--primary-light); }
.check-card b { font-size: 13.5px; font-weight: 600; display: block; }
.check-card span { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; line-height: 1.5; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.perm-group { margin-bottom: 18px; }
.perm-group > h5 { font-size: 13px; color: var(--text-2); margin-bottom: 9px; padding-left: 9px; border-left: 3px solid var(--primary); }

/* 批量操作条 */
.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--primary-light); border: 1px solid #cfe0f7; border-radius: 8px; padding: 9px 14px; margin-bottom: 12px; font-size: 13px; }
.batch-bar b { color: var(--primary-dark); }
.batch-bar .sp { margin-left: auto; }
.table td.ck, .table th.ck { width: 38px; text-align: center; padding-left: 8px; padding-right: 0; }

/* 导入弹窗 */
.drop-zone { border: 2px dashed #c3d4ec; border-radius: 12px; padding: 26px 18px; text-align: center; background: #fbfdff; cursor: pointer; transition: .18s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--primary); background: var(--primary-light); }
.drop-zone .ic { font-size: 34px; color: var(--primary); opacity: .75; }
.drop-zone p { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.drop-zone small { color: var(--text-3); }
.import-result { max-height: 190px; overflow: auto; background: #fff7f7; border: 1px solid #f6d6d6; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #a33; line-height: 1.8; margin-top: 12px; }

/* ============================================================
   移动端适配
   ============================================================ */
.menu-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-2); cursor: pointer; font-size: 18px; flex: none; }
.menu-toggle:active { background: var(--primary-light); }
.side-mask { display: none; position: fixed; inset: 0; background: rgba(15, 32, 60, .45); z-index: 99; }
.side-mask.show { display: block; }

@media (max-width: 1080px) {
  .hero-stat { display: none; }
  .login-left { display: none; }
  .login-box { margin: auto; width: 100%; max-width: 430px; }
  .form-row { grid-template-columns: 1fr; }
  .form.two { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* --- 控制台：侧边栏改为抽屉 --- */
  .menu-toggle { display: inline-flex; }
  .side { position: fixed; left: -260px; top: 0; height: 100vh; width: 250px; z-index: 100; transition: left .26s ease; box-shadow: 6px 0 24px rgba(0,0,0,.25); }
  .side.open { left: 0; }
  .content { padding: 14px 12px 32px; }
  .topnav { padding: 0 12px; gap: 10px; height: 54px; }
  .topnav .title { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topnav .right { gap: 8px; }
  .topnav .right .uname, .topnav .right .hide-sm { display: none; }
}

@media (max-width: 820px) {
  /* --- 门户首页 --- */
  .wrap { padding: 0 14px; }
  .topbar .wrap { height: auto; padding: 6px 14px; flex-wrap: wrap; gap: 4px; font-size: 12px; }
  .topbar a { margin-left: 12px; }
  .header .wrap { flex-wrap: wrap; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .header .search { display: none; }
  .logo-box img { height: 42px; }
  .logo-txt h1 { font-size: 19px; letter-spacing: 0; }
  .logo-txt p { display: none; }
  .header .user-area { margin-left: auto; }
  .btn-login, .btn-ghost { padding: 6px 14px; font-size: 13px; }
  .mainnav .wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .mainnav .wrap::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 11px 16px; font-size: 14px; white-space: nowrap; }
  .mainnav a.on::after { left: 16px; right: 16px; }

  .hero { padding: 32px 0 38px; }
  .hero h2 { font-size: 22px; letter-spacing: 1px; }
  .hero p { font-size: 14px; }
  .hero .bigsearch { margin-top: 18px; }
  .hero .bigsearch input { padding: 12px 14px; font-size: 14px; }
  .hero .bigsearch button { padding: 0 18px; font-size: 14px; }
  .marquee .wrap { height: auto; padding: 8px 14px; align-items: flex-start; }
  .marquee p { white-space: normal; }

  .section { padding: 26px 0; }
  .sec-head { flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .sec-head h3 { font-size: 18px; }
  .sec-head .en { display: none; }
  .svc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .svc-card { padding: 14px 8px; }
  .svc-card .ic { width: 40px; height: 40px; font-size: 20px; margin-bottom: 8px; }
  .svc-card h4 { font-size: 13.5px; }
  .svc-card p { display: none; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .stat { padding: 12px 13px; gap: 10px; }
  .stat .ic { width: 38px; height: 38px; font-size: 18px; }
  .stat b { font-size: 20px; }

  .card-head { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .footer { padding: 24px 0 16px; }
  .footer .cols { gap: 18px; }

  /* --- 表格：横向滚动 + 紧凑 --- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
  .table { font-size: 12.8px; }
  .table th, .table td { padding: 9px 8px; }
  .table td { white-space: nowrap; }
  .table .op a { margin-right: 8px; }

  /* --- 表单 / 工具栏 --- */
  .filter-bar { gap: 8px; }
  .filter-bar .input, .filter-bar .select, .filter-bar input, .filter-bar select { min-width: 0; flex: 1 1 130px; width: auto; }
  .toolbar { gap: 8px; }
  .toolbar .muted { margin-left: 0; width: 100%; }
  .field-row, .flow-row { grid-template-columns: 1fr; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
  .perm-grid { grid-template-columns: 1fr; }
  /* 视图多列网格塌成单列，避免手机端内容被挤窄、需要缩放 */
  .grid-2, .grid-dash, .grid-dash2, .grid-form, .grid-forum, .grid-3, .grid-portal { grid-template-columns: 1fr; }

  /* --- 弹窗改为底部抽屉 --- */
  .mask { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.small { max-width: 100%; width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; animation: sheetUp .24s ease; }
  .modal-body { padding: 16px 14px; }
  .modal-head { padding: 13px 14px; }
  .modal-foot { padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; justify-content: center; }

  /* --- 登录页 --- */
  .login-page { padding: 20px 14px; }
  .login-box { padding: 26px 20px; border-radius: 12px; }
  .login-box h3 { font-size: 19px; }

  /* --- 课表 / 发票 --- */
  .timetable { font-size: 11px; }
  .timetable th, .timetable td { padding: 3px; height: 46px; }
  .invoice { padding: 16px; }
  .invoice h2 { font-size: 18px; letter-spacing: 3px; }
  .invoice .seal { width: 84px; height: 84px; font-size: 11px; }
  .invoice .seal img { width: 84px; height: 84px; }
  .invoice .seal-cell { width: 96px; }

  .bar-row .bl { width: 92px; }
  .timeline li { padding-left: 18px; }
  .pager { justify-content: center; flex-wrap: wrap; }

  /* ===== 手机端防横向溢出兜底（彻底杜绝“需要双指缩放”） ===== */
  /* 任何比视口宽的元素都被裁掉，页面宽度永远 = 视口，浏览器不再整体缩小 */
  /* 加在根元素 html 上，不会破坏控制台的 position:sticky 吸顶 */
  html { overflow-x: hidden; }
  /* 禁止 iOS 在输入框聚焦时自动放大页面 */
  body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 15px; }
  /* 媒体与画布绝不溢出 */
  img, svg, video, canvas { max-width: 100%; height: auto; }
  /* 所有网格容器在手机上强制单列，避免任何残留多列把内容挤窄 */
  .grid-2, .grid-dash, .grid-dash2, .grid-form, .grid-forum, .grid-3, .grid-portal,
  .svc-grid, .stat-grid, .perm-grid, .footer .cols { grid-template-columns: 1fr !important; }
  /* 顶部导航允许换行而非横向滚动，减少误触与“需要缩放”的观感 */
  .mainnav .wrap { overflow-x: visible; flex-wrap: wrap; }
  .mainnav a { white-space: normal; }
  /* 控制台侧栏在手机上不占文档流宽度 */
  .side { max-width: 86vw; }
}

@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } }

@media (max-width: 480px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 19px; }
  .login-box { padding: 22px 16px; }
  .role-tabs button { font-size: 13px; padding: 8px 0; }
  .btn { padding: 8px 14px; }
}

/* 触屏设备：加大点按热区，输入框字号 ≥16px 防止 iOS 自动放大 */
@media (hover: none) and (pointer: coarse) {
  :where(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; padding: 10px 12px; }
  .btn, .btn.small, .pager button { min-height: 36px; }
  .table .op a { display: inline-block; padding: 3px 0; }
}
