/* 辅导员工作台（ISSUE-0017 第四端）。独立样式，不与 admin/enterprise 共用文件。
   V1.04 视觉活化：渐变主色 / 卡片浮起 / 全局过渡 / 柔和阴影，克制的"轻快商务"风。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb; --primary-dark: #1d4fc0; --primary-2: #3b82f6; --accent: #06b6d4;
  --bg: #f4f7fb; --card: #fff;
  --border: #e2e8f2; --text: #1c2430; --muted: #6b7686; --green: #0d9d5b; --red: #e5484d; --orange: #e08a00;
  --shadow-sm: 0 1px 3px rgba(28, 54, 105, .06);
  --shadow-md: 0 6px 18px rgba(28, 54, 105, .10);
  --shadow-lg: 0 14px 34px rgba(28, 54, 105, .16);
  --grad: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #06b6d4 100%);
}
body { font: 14px/1.65 "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; width: 100%; transition: border-color .18s, box-shadow .18s; }
input:hover, select:hover, textarea:hover { border-color: #b9c8e2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(59, 130, 246, .16); }

/* 顶栏：渐变 + 底部光带 */
.topbar { background: var(--grad); color: #fff; padding: 0 24px; display: flex; align-items: center; gap: 16px; height: 54px; box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 10; }
.topbar .brand { font-weight: 800; font-size: 16.5px; letter-spacing: .5px; }
.topbar .spacer { flex: 1; }
.topbar .whoami { opacity: .94; font-size: 13px; }

/* 按钮：渐变主按钮 + 悬浮上浮 */
.btn { border: none; border-radius: 8px; padding: 8px 18px; background: var(--grad); color: #fff; font-weight: 600; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); filter: brightness(1.05); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid #c6d6f2; box-shadow: none; }
.btn.ghost:hover { background: #f2f7ff; border-color: var(--primary-2); }
.btn.quiet { background: #eef2f8; color: var(--text); box-shadow: none; }
.btn.quiet:hover { background: #e3eaf5; }
.btn.danger { background: linear-gradient(135deg, #e5484d, #d93036); }
.btn.small { padding: 4px 12px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: none; color: var(--primary); text-decoration: underline; padding: 0; }

/* 布局：卡片浮起 */
.wrap { max-width: 1080px; margin: 22px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-md); }
.auth-box { max-width: 420px; margin: 8vh auto; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 30px 24px; position: relative; overflow: hidden; }
.auth-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--grad); }
.auth-box h1 { font-size: 19px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13px; }
.field small { color: var(--muted); font-weight: 400; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; }
.err { color: var(--red); font-size: 13px; min-height: 20px; margin: 4px 0; }
.hint { color: var(--muted); font-size: 12px; }

/* tabs：胶囊切换 + 平滑过渡 */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; background: #e8edf6; padding: 4px; border-radius: 11px; width: fit-content; }
.tabs button { border: none; background: transparent; padding: 7px 18px; border-radius: 8px; color: var(--muted); transition: background .18s, color .18s, box-shadow .18s; }
.tabs button:hover { color: var(--primary); }
.tabs button.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: var(--shadow-sm); }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; text-align: center; margin-left: 4px; }

/* 筛选条 */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 120px; }
.toolbar .grow { flex: 1; }

/* 列表：条目悬浮微亮 + 标题滑色 */
.job-item, .fair-item, .inv-item { border-bottom: 1px solid var(--border); padding: 14px 8px; margin: 0 -8px; display: flex; gap: 14px; align-items: flex-start; border-radius: 10px; transition: background .15s; }
.job-item:hover, .fair-item:hover, .inv-item:hover { background: #f7faff; }
.job-item:last-child, .fair-item:last-child, .inv-item:last-child { border-bottom: none; }
.job-main { flex: 1; min-width: 0; }
.job-title { font-weight: 700; font-size: 15px; color: var(--primary); transition: color .15s; }
.job-item:hover .job-title, .fair-item:hover .job-title { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b9cdf2; }
.job-salary { color: var(--red); font-weight: 700; white-space: nowrap; }
.meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge.blue { background: #e4edfd; color: #2563eb; }
.badge.green { background: #e0f5eb; color: var(--green); }
.badge.gray { background: #eef0f3; color: var(--muted); }
.badge.red { background: #fde9e9; color: var(--red); }
.badge.orange { background: #fdf1da; color: var(--orange); }
.badge.match { background: #e0f5eb; color: var(--green); font-weight: 700; }

/* 企业卡片（双选会选择器）：悬浮浮起 */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.co-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; position: relative; background: #fff; transition: box-shadow .18s, transform .18s, border-color .18s; }
.co-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #c6d6f2; }
.co-card.invited { opacity: .55; }
.co-card h4 { font-size: 14.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.co-stats { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.co-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; }

/* modal / toast */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 26, 48, .5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow: auto; animation: fadeIn .18s ease; }
.modal { background: #fff; border-radius: 16px; max-width: 640px; width: 100%; padding: 22px 24px; box-shadow: var(--shadow-lg); animation: popIn .2s ease; }
.modal h3 { margin-bottom: 12px; color: var(--primary); }
.modal .close-row { text-align: right; margin-top: 14px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 99; }
.toast { background: #223047; color: #fff; padding: 9px 18px; border-radius: 10px; margin-bottom: 8px; box-shadow: var(--shadow-lg); animation: popIn .2s ease; }
.toast.error { background: var(--red); }

/* 联系人：名片式 */
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 10px; box-shadow: var(--shadow-sm); }
.contact-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; }
.contact-avatar { width: 42px; height: 42px; border-radius: 50%; background: #e6f1fb; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex: none; }
.contact-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.contact-name { font-size: 15px; font-weight: 600; }
.contact-co { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-lines { padding-top: 8px; }
.c-line { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.c-line svg { flex: none; }
.c-line a { color: var(--text); text-decoration: none; font-weight: 600; }
.c-line a:hover { color: var(--primary); }
.c-strong { font-weight: 600; }
.c-copy { margin-left: auto; font-size: 12px; color: var(--primary); background: none; border: none; padding: 2px 6px; }
.c-copy:hover { text-decoration: underline; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; margin: 10px 0; font-size: 13.5px; }
.kv .k { color: var(--muted); }
.kv.welfare > span:not(.k) > span { display: inline-block; background: #edf4fd; color: var(--primary); border-radius: 5px; padding: 1px 9px; margin: 2px 4px 2px 0; font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 38px 0; font-size: 13.5px; }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.upload-prev { max-width: 180px; max-height: 130px; border-radius: 8px; border: 1px solid var(--border); margin-top: 8px; display: block; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 4px 14px; font-size: 13px; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.chip:hover { border-color: var(--primary-2); color: var(--primary); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; font-size: 12.5px; color: var(--muted); }
.steps .on { color: var(--primary); font-weight: 700; }

/* V1.03 双选会发布制：邀请目标进度条（渐变 + 流动感） */
.fair-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.fair-bar { width: 160px; height: 8px; background: #e9eef6; border-radius: 4px; overflow: hidden; flex: none; }
.fair-bar span { display: block; height: 100%; background: linear-gradient(90deg, #34d399, #0d9d5b); border-radius: 4px; transition: width .4s ease; }

/* 主办单位合并行（对标 91job：类型胶囊 + 名称输入同一行） */
.scope-row { display: flex; gap: 10px; align-items: center; }
.scope-row .chip-group { flex: none; }
.scope-row input { flex: 1; min-width: 0; }
.scope-row input:disabled { background: #f5f7fa; color: var(--muted); cursor: not-allowed; }
.scope-row select { flex: none; width: 132px; }
.scope-row select:disabled { background: #f5f7fa; color: var(--muted); cursor: not-allowed; }
.field label .req { color: #e24b4a; margin-left: 2px; font-weight: 400; }

/* 弹窗右上角关闭叉（替代底部"关闭"按钮） */
.modal { position: relative; }
.modal-x { position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px; transition: background .15s, color .15s; }
.modal-x:hover { background: #eef1f6; color: var(--text); }

/* 日期 + 起止时间三列行（对齐后台样式，原生控件） */
.row3 { display: flex; gap: 10px; }
.row3 > * { flex: 1; }

/* 日期选择：原生 date 控件隐藏为透明覆盖层（只借日历弹层），可见的是只读文本框（占位/选中值完全自控） */
.date-field { position: relative; }
.date-field > input[type="date"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer;
  pointer-events: none; /* 点击穿透到可见文本框，由文本框 click 调 showPicker() */
}
.date-field > input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }
.date-field > input[readonly] { cursor: pointer; }

/* 发布表单内「输入 + 添加」行与下方 chip 列表留出间距 */
#fa-majors { margin-top: 10px; }

/* D10 邀请码：顶栏轻量胶囊展示，配套复制按钮 */
.invite-chip { background: #edf4fd; color: var(--primary); border-radius: 14px; padding: 3px 12px; font-size: 12.5px; }
.invite-chip b { letter-spacing: 1px; }

/* 走查反馈：返回按钮做成标准"返回"样式（CSS 画左尖角，不用字符箭头） */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line, #dfe3ea); background: #fff; color: #475569;
  border-radius: 10px; padding: 7px 14px 7px 11px; cursor: pointer;
  font-size: 13.5px; transition: all .15s ease; white-space: nowrap;
}
.back-btn::before {
  content: ''; width: 8px; height: 8px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -1px;
}
.back-btn:hover { border-color: var(--primary, #2f6bff); color: var(--primary, #2f6bff); background: #f5f9ff; }

/* 双选会详情弹窗三板块（走查反馈：功能分块不明显） */
.sec { border: 1px solid #e6eaf1; border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: #fafbfd; }
.sec-title { font-size: 13.5px; font-weight: 700; color: #334155; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px dashed #e6eaf1; }
.sec-row:first-of-type { border-top: 0; }

/* 双选会列表「全部 / 我发布的」胶囊切换 Tab */
.seg-tabs { display: inline-flex; background: #eef1f6; border-radius: 10px; padding: 3px; gap: 2px; }
.seg-tab { border: 0; background: transparent; color: #64748b; font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.seg-tab.active { background: #fff; color: var(--primary, #2f6bff); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* 审核结果确认弹窗：第二层，叠在详情弹窗上方；宽度小于详情弹窗（640px） */
.notice-mask { position: fixed; inset: 0; background: rgba(15, 26, 48, .45); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px; animation: fadeIn .18s ease; }
.notice-box { position: relative; background: #fff; border-radius: 16px; width: 360px; max-width: calc(100vw - 32px); padding: 22px 22px 18px; box-shadow: var(--shadow-lg); animation: popIn .2s ease; }
.notice-box h3 { color: var(--primary); margin-bottom: 8px; }
