/* Manager Show · 个人管理驾驶舱 —— 无外部依赖的自绘样式 */
:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #1d2333;
  --ink-2: #5a6274;
  --ink-3: #9aa1b5;
  --line: #e6e8f0;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --green: #0e9f6e;
  --green-soft: #e6f7f0;
  --red: #e0245e;
  --red-soft: #fdeef2;
  --amber: #c27803;
  --amber-soft: #fdf3e0;
  --blue: #2563eb;
  --blue-soft: #e8f0fe;
  --violet: #7c3aed;
  --violet-soft: #f1ebfe;
  --gray-soft: #f0f1f6;
  --sidebar: #161b2e;
  --sidebar-ink: #c3c9dd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 27, 46, .05), 0 6px 24px -8px rgba(23, 27, 46, .08);
  --shadow-hover: 0 2px 4px rgba(23, 27, 46, .06), 0 12px 32px -8px rgba(23, 27, 46, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
}

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

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-weight: 800; font-size: 14px;
  display: grid; place-items: center; letter-spacing: .5px;
  box-shadow: 0 4px 14px -2px rgba(99, 102, 241, .55);
}
.brand-name { color: #fff; font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 11.5px; color: #7d86a5; margin-top: -2px; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-ink); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 4px 14px -4px rgba(99, 102, 241, .6); }
.nav-icon { width: 18px; text-align: center; opacity: .9; }

.sidebar-foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid rgba(255, 255, 255, .08); }
.foot-note { font-size: 11.5px; color: #6d7590; text-align: center; margin-top: 10px; }
.sidebar .btn-ghost { color: var(--sidebar-ink); border-color: rgba(255, 255, 255, .14); }
.sidebar .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- 主区域 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px 12px;
}
.topbar-title { font-size: 20px; font-weight: 700; }
.topbar-date { margin-left: auto; color: var(--ink-3); font-size: 13px; }
#btn-menu { display: none; }
.view { padding: 6px 28px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.loading { color: var(--ink-3); padding: 40px 0; text-align: center; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s;
}
.card.hoverable:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 10px; padding: 8px 14px;
  font-size: 13.5px; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: #c9cede; background: #fafbfd; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 3px 10px -3px rgba(79, 70, 229, .5);
}
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #f3c2d2; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.icon-btn { padding: 6px 9px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
}
.b-gray { background: var(--gray-soft); color: var(--ink-2); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-violet { background: var(--violet-soft); color: var(--violet); }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-accent { background: var(--accent-soft); color: var(--accent); }

.section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.section-title .count { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }
.empty { color: var(--ink-3); font-size: 13px; padding: 18px 4px; text-align: center; }

/* ---------- 今日首页 ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  padding: 16px 18px;
  position: relative; overflow: hidden;
}
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.stat::after {
  content: ""; position: absolute; right: -14px; top: -14px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); opacity: .8;
}
.stat:nth-child(2)::after { background: var(--blue-soft); }
.stat:nth-child(3)::after { background: var(--green-soft); }
.stat:nth-child(4)::after { background: var(--amber-soft); }
.stat:nth-child(5)::after { background: var(--violet-soft); }

.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 18px; }
.panel { padding: 18px 18px 14px; }

.focus-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 4px; border-bottom: 1px dashed var(--line);
}
.focus-item:last-child { border-bottom: none; }
.focus-rank {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 2px;
}
.focus-item.done .focus-title { text-decoration: line-through; color: var(--ink-3); }
.focus-title { font-weight: 600; }
.focus-meta { color: var(--ink-3); font-size: 12px; margin-top: 1px; }

.check {
  appearance: none; width: 18px; height: 18px; border-radius: 6px;
  border: 1.5px solid #c9cede; cursor: pointer; flex-shrink: 0; margin-top: 3px;
  display: grid; place-items: center; transition: all .15s; background: #fff;
}
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }

.risk-item { padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.risk-item:last-child { border-bottom: none; }
.risk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.risk-title { font-weight: 600; }
.risk-meta { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.risk-days { color: var(--red); font-weight: 700; font-size: 12px; }

.event-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.event-item:last-child { border-bottom: none; }
.event-date {
  flex-shrink: 0; width: 52px; text-align: center;
  background: var(--gray-soft); border-radius: 10px; padding: 5px 0;
}
.event-date .m { font-size: 10.5px; color: var(--ink-3); line-height: 1.2; }
.event-date .d { font-size: 16px; font-weight: 800; line-height: 1.2; }
.event-item.today .event-date { background: var(--accent-soft); }
.event-item.today .event-date .d { color: var(--accent); }
.event-title { font-weight: 600; }
.event-meta { color: var(--ink-3); font-size: 12px; }

/* ---------- 校招投递看板 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="search"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  font-size: 13.5px; font-family: inherit; width: 220px; background: var(--card);
}
.toolbar input[type="search"]:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: #c9cede; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.lane { background: #eceef5; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13.5px; }
.lane-count { background: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; color: var(--ink-2); }
.lane-cards { display: flex; flex-direction: column; gap: 10px; }
.app-card { padding: 12px 14px; cursor: pointer; }
.app-card .company { font-weight: 700; font-size: 14.5px; }
.app-card .position { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }
.app-card .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.app-card .next {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px;
}
.app-card .next .date { white-space: nowrap; font-weight: 600; }
.app-card .next.overdue, .app-card .next.overdue .date { color: var(--red); }
.lane-empty { color: var(--ink-3); font-size: 12px; text-align: center; padding: 14px 0 10px; }

/* ---------- 任务日程 ---------- */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.task-group { margin-bottom: 6px; }
.task-group-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 10px 2px 6px; display: flex; gap: 8px; align-items: center; }
.task-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.task-row:last-child { border-bottom: none; }
.task-row .body { flex: 1; min-width: 0; }
.task-row .title { font-weight: 600; }
.task-row.done .title { text-decoration: line-through; color: var(--ink-3); }
.task-row .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.task-row .meta .overdue { color: var(--red); font-weight: 700; }
.task-row .row-actions { opacity: 0; display: flex; gap: 4px; transition: opacity .15s; }
.task-row:hover .row-actions { opacity: 1; }

.inline-form { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.inline-form input:focus, .inline-form select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.inline-form .grow { flex: 1; min-width: 140px; }

/* ---------- 成果记录 ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 18px 12px; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.tl-card { padding: 14px 16px; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-date { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.tl-title { font-weight: 700; font-size: 14.5px; }
.tl-impact { color: var(--green); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.tl-desc { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.tl-actions { margin-left: auto; display: flex; gap: 4px; }

/* ---------- 弹窗 / 表单 ---------- */
/* 浏览器的 [hidden] 默认样式会被下方 display:grid 覆盖；明确优先隐藏，避免首次打开出现无法关闭的遮罩方块。 */
.modal-mask[hidden], .toast[hidden] { display: none !important; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 40, .45);
  display: grid; place-items: center; z-index: 50; padding: 18px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 64px -12px rgba(0, 0, 0, .35);
}
.modal-head { display: flex; align-items: center; padding: 18px 20px 0; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 14px 20px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 64px; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.form-foot .left { margin-right: auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; z-index: 60; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4);
  animation: toast-in .2s ease-out;
}
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-col:first-child { grid-column: 1 / -1; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
    transform: translateX(-100%); transition: transform .2s ease-out;
    height: 100%;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
  #btn-menu { display: inline-flex; }
  .topbar, .view { padding-left: 16px; padding-right: 16px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar input[type="search"] { width: 100%; }
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #161b2e 0%, #232a4a 55%, #2c2f63 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 30px 28px;
}
.login-card .brand { padding: 0 0 6px; justify-content: center; }
.login-card .brand-name { color: var(--ink); }
.login-sub {
  margin: 0 0 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.login-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-error {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
}
