/* ============================================================
   试用期管理系统 · 设计系统
   简洁高级 / 插画点缀
   ============================================================ */
:root {
  /* 主色 · 墨蓝 */
  --ink-900: #14233d;
  --ink-700: #223b5e;
  --ink-500: #3a5b82;
  --brand: #2b5b8c;
  --brand-soft: #eaf1fa;
  --brand-2: #4a86c9;

  /* 中性 */
  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --card: #ffffff;
  --line: #e6ebf2;
  --text: #223147;
  --text-2: #5b6b84;
  --text-3: #93a1b5;

  /* 语义色 */
  --ok: #2e9e6b;
  --ok-soft: #e6f6ee;
  --warn: #d9822b;
  --warn-soft: #fdf2e4;
  --danger: #d6534a;
  --danger-soft: #fdeceb;
  --info: #4a86c9;
  --info-soft: #eaf2fb;

  /* 尺寸 */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(20, 35, 61, .04), 0 8px 24px rgba(20, 35, 61, .05);
  --shadow-hover: 0 6px 16px rgba(20, 35, 61, .08), 0 14px 40px rgba(20, 35, 61, .09);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 85% -10%, #eef3fa 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #e9eef7 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 236px; flex: 0 0 236px;
  background: linear-gradient(180deg, #1b2e4e 0%, #14233d 100%);
  color: #cfdbe9;
  padding: 22px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #4a86c9, #2b5b8c);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 10px rgba(42, 91, 140, .35);
}
.brand .t { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .3px; }
.brand .s { font-size: 11px; color: #8fa6c4; }

.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #7189a8; padding: 16px 8px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0; border-radius: var(--radius-sm);
  color: #b7c6da; cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(74, 134, 201, .22); color: #fff; box-shadow: inset 2px 0 0 #5aa0dd; }
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
  border-radius: 9px; padding: 0 7px; height: 18px; line-height: 18px; font-weight: 600;
}
.side-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#5aa0dd,#2b5b8c); display: grid; place-items: center; color:#fff; font-weight:600; font-size:14px; }
.side-user .n { font-size: 13px; color: #fff; font-weight: 600; }
.side-user .r { font-size: 11px; color: #8fa6c4; }
.side-user .side-logout { margin-left: auto; background: none; border: none; color: #8fa6c4; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.side-user .side-logout:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- 登录网关 ---------- */
.login-gate { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 700px at 20% 0%, #e8f1fb 0%, #f4f8fd 40%, #eef4fb 100%); }
.login-gate .lg-card { width: 380px; max-width: 90vw; background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(30,60,100,.14); padding: 38px 34px 30px; text-align: center; }
.login-gate .lg-ill { width: 150px; height: 108px; margin: 0 auto 16px; }
.login-gate .lg-ill svg { width: 100%; height: 100%; }
.login-gate h2 { font-size: 20px; color: var(--text); margin: 6px 0 4px; }
.login-gate p { font-size: 13px; color: var(--text-2); margin: 0 0 24px; }
.login-gate .lg-tip { margin-top: 16px; font-size: 12.5px; color: #93a1b5; }
.login-gate .btn.ok { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 主内容 ---------- */
.main { flex: 1; min-width: 0; padding: 26px 30px 40px; }

.page-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-top h1 { font-size: 22px; font-weight: 700; color: var(--ink-900); letter-spacing: .2px; }
.page-top p { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.top-actions { display: flex; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 6px rgba(43,91,140,.2);
}
.btn:hover { background: var(--ink-500); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(43,91,140,.3); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--brand); border-color: #c7d6e8; box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand); }
.btn.soft { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.soft:hover { background: #dde9f7; }
.btn.ok { background: var(--ok); box-shadow: 0 2px 6px rgba(46,158,107,.2); }
.btn.danger-soft { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.btn.danger-soft:hover { background: #fbdfdd; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 20px;
}
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px){ .grid-4{grid-template-columns:repeat(2,1fr)} .grid-3{grid-template-columns:repeat(1,1fr)} }
@media (max-width: 720px){ .grid-4,.grid-2{grid-template-columns:1fr} .sidebar{display:none} }

/* ---------- 统计卡 ---------- */
.stat {
  display: flex; gap: 14px; align-items: center; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.stat:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 46px; }
.stat .ic svg { width: 24px; height: 24px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--ink-900); line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--text-2); }
.ic-blue { background: var(--info-soft); color: var(--info); }
.ic-green { background: var(--ok-soft); color: var(--ok); }
.ic-orange { background: var(--warn-soft); color: var(--warn); }
.ic-red { background: var(--danger-soft); color: var(--danger); }
.ic-navy { background: var(--brand-soft); color: var(--brand); }

/* ---------- 员工卡 / 概览 ---------- */
.hero {
  background: linear-gradient(120deg, #223b5e 0%, #2b5b8c 55%, #3a6ea8 100%);
  border-radius: var(--radius); padding: 24px 26px; color: #fff;
  display: flex; gap: 22px; align-items: center; position: relative; overflow: hidden;
  box-shadow: 0 10px 28px rgba(43,91,140,.28);
}
.hero .mesh { position: absolute; right: -40px; top: -60px; opacity: .35; }
.hero .avatar-lg { width: 62px; height: 62px; border-radius: 18px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: 0 0 62px; backdrop-filter: blur(4px); }
.hero .who h2 { font-size: 20px; font-weight: 700; }
.hero .who .sub { font-size: 13px; color: rgba(255,255,255,.82); margin-top: 3px; }
.hero .tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero .tag { font-size: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 4px 10px; }
.hero .progress-block { margin-left: auto; text-align: center; flex: 0 0 auto; }
.progress-ring { position: relative; width: 86px; height: 86px; }
.progress-ring .ring-svg { transform: rotate(-90deg); }
.progress-ring .ring-bg { stroke: rgba(255,255,255,.16); }
.progress-ring .ring-val { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.progress-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.progress-block .pl { font-size: 12px; color: rgba(255,255,255,.82); margin-top: 4px; }

/* ---------- 时间线 ---------- */
.timeline { margin-top: 4px; }
.tl-item { display: flex; gap: 16px; padding: 14px 4px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 27px; top: 62px; bottom: -18px; width: 2px;
  background: var(--line);
}
.tl-ic {
  width: 54px; height: 54px; border-radius: 15px; flex: 0 0 54px;
  display: grid; place-items: center; position: relative; z-index: 1;
  border: 1.5px solid var(--line); background: #fbfcfe;
}
.tl-ic svg { width: 27px; height: 27px; }
.tl-item.done .tl-ic { background: var(--ok-soft); border-color: #cbead9; }
.tl-item.done .tl-ic svg { color: var(--ok); }
.tl-item.current .tl-ic { background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 5px rgba(43,91,140,.08); }
.tl-item.current .tl-ic svg { color: var(--brand); }
.tl-item.todo .tl-ic svg { color: var(--text-3); }
.tl-item.warn-node .tl-ic { background: var(--warn-soft); border-color: #f0d9b8; }
.tl-item.warn-node .tl-ic svg { color: var(--warn); }

.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-title .n { font-weight: 700; font-size: 15px; color: var(--ink-900); }
.tl-title .d { font-size: 12px; color: var(--text-3); }
.tl-desc { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.tl-meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }

.pill { font-size: 12px; font-weight: 600; border-radius: 8px; padding: 3px 10px; display: inline-flex; align-items: center; gap: 5px; }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.current { background: var(--brand-soft); color: var(--brand); }
.pill.todo { background: var(--bg-soft); color: var(--text-3); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.count { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 待办提交卡 ---------- */
.task-card { display: flex; gap: 18px; align-items: flex-start; }
.task-card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 46px; }
.task-card .ic svg { width: 23px; height: 23px; }
.task-card .bd { flex: 1; min-width: 0; }
.task-card .bd .h { font-weight: 700; font-size: 15px; color: var(--ink-900); }
.task-card .bd .m { font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid #f0f3f8; color: var(--text); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafcff; }
.tbl .emp { display: flex; align-items: center; gap: 10px; }
.tbl .emp .av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.tbl .emp .e { font-weight: 600; color: var(--ink-900); }
.tbl .emp .d { font-size: 12px; color: var(--text-3); }

/* 进度条 */
.bar { height: 6px; border-radius: 4px; background: var(--bg-soft); width: 100px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg,#4a86c9,#2b5b8c); }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; }
.field .in, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px; font-family: var(--font); color: var(--text); background: #fbfcfe;
  transition: border .18s, box-shadow .18s; outline: none;
}
.field .in:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,91,140,.12); background: #fff; }
.people-pick { border: 1px dashed #c7d6e8; border-radius: 10px; padding: 12px; background: #fbfcfe; }
.people-pick .pp-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.people-pick .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.emp-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.emp-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: 13.5px; color: var(--text); border-bottom: 1px solid #eef3f8; }
.emp-opt:last-child { border-bottom: none; }
.emp-opt:hover { background: #f4f7fb; }
.emp-opt.sel { background: #eef4ff; color: var(--brand); }
.emp-opt input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; }
.emp-opt .av { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.emp-empty { padding: 16px; text-align: center; color: #93a1b5; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 4px 8px 4px 6px; font-size: 12.5px; color: var(--text); }
.chip .av { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.chip .x { color: var(--text-3); cursor: pointer; font-size: 14px; line-height: 1; }
.chip .x:hover { color: var(--danger); }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16,28,48,.42); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; padding: 26px; box-shadow: 0 20px 60px rgba(16,28,48,.25); animation: pop .22s ease; max-height: 88vh; overflow-y: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98);} to { opacity: 1; transform: none;} }
.modal .mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal .mh h3 { font-size: 17px; font-weight: 700; color: var(--ink-900); }
.modal .mh .close { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; top: 20px; right: 24px; z-index: 99; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink-900); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(16,28,48,.25); animation: slideIn .25s ease; display: flex; align-items: center; gap: 9px; }
.toast.ok { background: #1e6f4e; }
.toast.err { background: #a63f38; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px);} to { opacity:1; transform: none;} }

/* ---------- 页脚/空态 ---------- */
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }
.empty svg { width: 56px; height: 56px; opacity: .4; margin-bottom: 10px; }
.hidden { display: none !important; }

.section-title { font-size: 14px; font-weight: 700; color: var(--ink-900); margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--brand); }
.section-title .more { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
