/* ============ 学院科创对接平台 - 全局样式 ============ */
:root {
  --primary: #2f6fed;
  --primary-dark: #1e56c8;
  --primary-light: #e8f0fe;
  --accent: #0fb981;
  --accent-light: #e3f7f0;
  --warn: #f59e0b;
  --warn-light: #fef3e2;
  --danger: #e5484d;
  --danger-light: #fdebec;
  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #8a94a6;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #e5eaf2;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(30, 60, 120, .07);
  --shadow-lg: 0 8px 30px rgba(30, 60, 120, .13);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::selection { background: var(--primary-light); }

/* ===== 顶部导航 ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--primary); white-space: nowrap; }
.logo-badge {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #2f6fed, #0fb981);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.logo-badge-img {
  width: 36px; height: 36px; object-fit: contain; display: block; flex-shrink: 0;
}
.logo small { display: block; font-size: 10px; color: var(--text-3); font-weight: 400; line-height: 1.1; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  padding: 7px 13px; border-radius: 8px; color: var(--text-2);
  font-size: 14px; transition: all .15s; white-space: nowrap;
}
.nav a:hover { background: var(--primary-light); color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 10px; }
.msg-btn { position: relative; background: none; border: none; font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 7px 12px; border-radius: 8px; }
.msg-btn:hover { background: var(--primary-light); }
.msg-dot {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; font-size: 10px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  background: var(--primary-light); border-radius: 20px; cursor: pointer;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; color: #fff;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.user-chip .u-name { font-size: 13px; font-weight: 600; color: var(--primary-dark); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 布局 ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 22px 20px 60px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.section-head .more { color: var(--primary); font-size: 13px; cursor: pointer; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; background: var(--primary-light); color: var(--primary);
}
.tag.green { background: var(--accent-light); color: var(--accent); }
.tag.orange { background: var(--warn-light); color: #c07a08; }
.tag.red { background: var(--danger-light); color: var(--danger); }
.tag.gray { background: #eef1f6; color: var(--text-3); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 14px; transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.green { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.green:hover { filter: brightness(.94); }
.btn.danger { background: var(--danger-light); border-color: transparent; color: var(--danger); }
.btn.sm { padding: 4px 12px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 表单 ===== */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: #fff; outline: none; transition: border .15s;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-item textarea { min-height: 84px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ===== 筛选栏 ===== */
.filter-bar {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
}
.filter-bar input[type="text"] {
  flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 9px; outline: none;
}
.filter-bar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }

/* ===== 列表项 ===== */
.list-item {
  display: flex; justify-content: space-between; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; transition: all .2s;
}
.list-item:hover { box-shadow: var(--shadow-lg); border-color: #c9d8f5; }
.list-item h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 5px; }
.list-item .meta { font-size: 13px; color: var(--text-3); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 7px; }
.list-item .desc { font-size: 13px; color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; flex-shrink: 0; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
th { background: #f7f9fd; text-align: left; padding: 11px 14px; font-weight: 700; color: var(--text-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #f0f3f9; vertical-align: middle; }
tr:hover td { background: #fafcff; }

/* ===== 时间线 ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before {
  content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 3px solid var(--primary);
}
.timeline-item .t-date { font-size: 12.5px; color: var(--primary); font-weight: 700; }
.timeline-item .t-title { font-size: 14px; font-weight: 600; }

/* ===== 统计卡 ===== */
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .s-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .s-label { font-size: 13px; color: var(--text-3); }
.stat-card .s-label-top { font-size: 15.5px; font-weight: 700; color: var(--text-2); margin-bottom: 2px; }
.stat-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #eef1f6; margin-top: 10px; }
.stat-bar span { height: 100%; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 30, 60, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 640px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .2s;
}
.modal.lg { max-width: 820px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 2; border-radius: 16px 16px 0 0;
}
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-3); cursor: pointer; padding: 0 4px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== 消息气泡 ===== */
.chat-box { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; padding: 6px 2px; }
.chat-msg { max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; }
.chat-msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.other { align-self: flex-start; background: #f1f4f9; color: var(--text); border-bottom-left-radius: 3px; }
.chat-msg .c-from { font-size: 11px; opacity: .75; margin-bottom: 2px; }

/* ===== Toast ===== */
#toast-wrap { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 22px; border-radius: 10px; color: #fff; font-size: 14px;
  background: #333f54; box-shadow: var(--shadow-lg); animation: pop .25s;
}
.toast.success { background: var(--accent); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warn); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty .e-icon { font-size: 42px; margin-bottom: 10px; }

/* ===== 登录页 ===== */
.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 30px 16px;
  background: linear-gradient(135deg, #eaf2ff 0%, #f2fbf7 60%, #eef4ff 100%); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 30px 24px; }
.auth-card h1 { font-size: 21px; font-weight: 800; text-align: center; margin-bottom: 4px; color: var(--text); }
.auth-card .sub { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 20px; }
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.role-tabs button {
  padding: 10px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--text-3); transition: all .15s;
}
.role-tabs button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 14px; }
.auth-switch a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ===== 横幅 ===== */
.hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #2f6fed 70%, #4a80f0 100%);
  border-radius: 16px; color: #fff; padding: 34px 34px 30px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::before { content: ""; position: absolute; right: 80px; bottom: -80px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.hero p { opacity: .92; font-size: 14px; max-width: 560px; }
.hero .hero-btns { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hero-btns .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); color: #fff; }
.hero .hero-btns .btn.solid { background: #fff; color: var(--primary); border-color: #fff; font-weight: 700; }

/* ===== 徽章数字 ===== */
.badge-num {
  display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; align-items: center; justify-content: center; font-weight: 700;
}

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--border); background: #fff; padding: 22px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.footer-icp { margin-top: 10px; letter-spacing: .3px; }
.footer-icp a { color: var(--text-3); text-decoration: none; border-bottom: 1px dotted currentColor; padding-bottom: 1px; }
.footer-icp a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.footer-icp .icp-badge { width: 20px; height: 22px; display: block; opacity: .92; vertical-align: -5px; }
.footer-icp a:hover { color: #2f6b4f; border-bottom-style: solid; }


/* ===== 侧栏布局（个人中心/管理端）===== */
.panel-layout { display: grid; grid-template-columns: 218px 1fr; gap: 18px; align-items: start; }
.side-nav { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; position: sticky; top: 78px; }
.side-nav a {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; margin-bottom: 2px; cursor: pointer; transition: all .15s;
}
.side-nav a:hover { background: #f4f7fd; }
.side-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.side-nav .side-group { font-size: 11.5px; color: var(--text-3); padding: 12px 13px 4px; font-weight: 700; letter-spacing: .05em; }

/* ===== 响应式 ===== */
.menu-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--text-2); padding: 6px; }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .panel-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side-nav a { margin: 0; }
  .side-nav .side-group { width: 100%; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 10px 14px; box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .header-inner { gap: 10px; padding: 0 14px; }
  .logo small { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .container { padding: 16px 14px 50px; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 20px; }
  .list-item { flex-direction: column; }
  .item-actions { flex-direction: row; }
  .user-chip .u-name { display: none; }
}

/* ===== 个人资料页 ===== */
.pf-banner { display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, #eef4ff, #f8fbff); border: 1px solid #e3ecff; border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.pf-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #2f6fed, #5b8cff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex: 0 0 56px; }
.pf-head { flex: 1; min-width: 0; }
.pf-name { font-size: 19px; font-weight: 800; display: flex; align-items: center; }
.pf-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.pf-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .pf-cols { grid-template-columns: 1fr; } }
.pi-list { display: flex; flex-direction: column; }
.pi-row { display: flex; align-items: baseline; padding: 11px 4px; border-bottom: 1px dashed #eef1f6; font-size: 14px; }
.pi-row:last-child { border-bottom: none; }
.pi-k { flex: 0 0 96px; color: var(--text-3); font-size: 13px; letter-spacing: 1px; }
.pi-v { flex: 1; font-weight: 600; padding-left: 20px; color: var(--text-1); }
.pi-note { font-size: 11px; color: var(--text-3); font-weight: 400; margin-left: 10px; }
