/* WanLink · iOS 风设计系统 */
:root {
  --accent: #3d8b7d;
  --accent-deep: #2f6f64;
  --accent-weak: #e9f2f0;
  --bg: #f4f5f6;
  --card: #ffffff;
  --text: #131316;
  --text-2: #5c5c63;
  --text-3: #9a9aa0;
  --line: rgba(0, 0, 0, .07);
  --line-strong: rgba(0, 0, 0, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .035);
  --ok: #2f8f5b;
  --warn: #b8720f;
  --bad: #c0392b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.55;
  overscroll-behavior-y: none;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex: none; padding: 22px 14px;
  border-right: 0.5px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 12px 20px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, #4fa294, #2f6f64);
  color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.5px;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -2px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  color: var(--text-2); font-size: 14px; font-weight: 450;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(0, 0, 0, .04); }
.nav-item.on { background: var(--accent-weak); color: var(--accent-deep); font-weight: 550; }
.nav-item .ic { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #e8543f; color: #fff;
  font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 890px; margin: 0 auto; padding: 32px 28px 90px; }

.topbar { display: none; }

/* ---------- 通用 ---------- */
.page-title { font-size: 27px; font-weight: 600; letter-spacing: -.6px; margin: 0 0 3px; }
.page-sub { color: var(--text-3); font-size: 13px; margin: 0 0 22px; }
.sec-title {
  font-size: 12px; font-weight: 550; color: var(--text-3);
  letter-spacing: .3px; margin: 24px 4px 9px; text-transform: none;
}

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card.pad { padding: 18px; }
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  cursor: pointer; transition: background .15s;
}
.row + .row { border-top: 0.5px solid var(--line); }
.row:hover { background: rgba(0, 0, 0, .018); }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-size: 14.5px; font-weight: 500; letter-spacing: -.1px; }
.row .t2 { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.chev { width: 7px; height: 12px; flex: none; opacity: .28; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 550; letter-spacing: -.3px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

.btn {
  border: none; border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 14px; font-weight: 550; cursor: pointer;
  background: var(--accent); color: #fff;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: rgba(0, 0, 0, .05); color: var(--text); }
.btn.danger { background: #fdecea; color: var(--bad); }
.btn.wide { width: 100%; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-3); margin: 0 0 6px 3px; }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 13px; border: none; border-radius: var(--radius-sm);
  background: #f2f3f4; outline: none; font-size: 14.5px;
  transition: background .15s, box-shadow .15s;
}
.input:focus, textarea.input:focus {
  background: #fff; box-shadow: 0 0 0 2px var(--accent-weak), 0 0 0 3px var(--accent);
}
textarea.input { resize: vertical; min-height: 88px; line-height: 1.6; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 11px; font-size: 11.5px; font-weight: 550; letter-spacing: .1px;
}
.tag.pending { background: #fdf3e3; color: var(--warn); }
.tag.approved { background: #e9f5ee; color: var(--ok); }
.tag.rejected { background: #fdecea; color: var(--bad); }
.tag.gray { background: #f0f1f2; color: var(--text-3); }

.segmented {
  display: flex; background: rgba(0, 0, 0, .05); border-radius: 11px;
  padding: 3px; gap: 2px; margin-bottom: 18px;
}
.segmented button {
  flex: 1; border: none; background: transparent; padding: 7px 0;
  border-radius: 9px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); cursor: pointer; transition: background .2s, color .2s;
}
.segmented button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.empty { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 46px 10px; }

/* ---------- 工作台 ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.hello h1 { font-size: 29px; font-weight: 600; letter-spacing: -.8px; margin: 0; }
.hello .d { color: var(--text-3); font-size: 13px; margin-top: 4px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.quick {
  background: var(--card); border-radius: 15px; padding: 14px 8px 12px;
  text-align: center; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s;
}
.quick:active { transform: scale(.97); }
.quick .qi {
  width: 38px; height: 38px; border-radius: 12px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-deep);
}
.quick span { font-size: 12.5px; color: var(--text-2); }

.stat-row { display: flex; gap: 11px; margin-top: 12px; }
.stat {
  flex: 1; background: var(--card); border-radius: 15px; padding: 13px 15px;
  box-shadow: var(--shadow); cursor: pointer;
}
.stat .n { font-size: 23px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat.hot .n { color: var(--accent-deep); }

.clock-card {
  background: linear-gradient(150deg, #4b9c8e, #2f6f64);
  border-radius: var(--radius); padding: 20px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 8px 26px rgba(47, 111, 100, .22);
}
.clock-card .lab { font-size: 12.5px; opacity: .82; }
.clock-card .big { font-size: 26px; font-weight: 600; letter-spacing: -.6px; margin-top: 2px; }
.clock-card .btn { background: rgba(255, 255, 255, .94); color: var(--accent-deep); }
.clock-card .btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- 组织 ---------- */
.dept { margin-bottom: 12px; }
.dept-head { display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; }
.dept-name { font-size: 15px; font-weight: 550; letter-spacing: -.15px; }
.dept-duty { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.member-grid { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 16px 16px; }
.member {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 9px;
  border-radius: 12px; background: #f4f6f6; cursor: pointer; transition: background .15s;
  min-width: 124px;
}
.member:hover { background: #eaeeed; }
.member .nm { font-size: 13px; font-weight: 500; }
.member .ti { font-size: 11px; color: var(--text-3); }

/* ---------- 审批 ---------- */
.appr-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-deep);
}
.steps { padding: 4px 16px 16px; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.step:last-child { padding-bottom: 4px; }
.step .dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none;
  background: #e2e4e5; box-shadow: 0 0 0 3px #fff;
}
.step.done .dot { background: var(--ok); }
.step.rej .dot { background: var(--bad); }
.step.now .dot { background: var(--accent); }
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 4px; top: 16px; bottom: 0;
  width: 1px; background: var(--line-strong);
}

.detail-grid { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; padding: 16px; }
.detail-grid .k { color: var(--text-3); font-size: 13px; }
.detail-grid .v { font-size: 14px; }

/* ---------- 公告 ---------- */
.news-item { padding: 16px; cursor: pointer; }
.news-item + .news-item { border-top: 0.5px solid var(--line); }
.news-title { font-size: 15px; font-weight: 550; letter-spacing: -.15px; }
.news-meta { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; gap: 8px; align-items: center; }
.news-body { font-size: 14px; color: var(--text-2); line-height: 1.75; white-space: pre-wrap; margin-top: 12px; }
.dot-unread { width: 7px; height: 7px; border-radius: 50%; background: #e8543f; display: inline-block; }

/* ---------- 沟通 ---------- */
.chat-wrap { display: flex; height: calc(100vh - 130px); min-height: 460px; gap: 12px; }
.chat-list { width: 210px; flex: none; overflow: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { padding: 13px 16px; border-bottom: 0.5px solid var(--line); font-size: 14px; font-weight: 550; }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msgs > .msg:first-child { margin-top: auto; }
.msg { display: flex; gap: 9px; align-items: flex-start; }
.msg > div { max-width: min(78%, 520px); min-width: 0; }
.msg .bubble {
  background: #f2f3f4; border-radius: 15px 15px 15px 4px; padding: 9px 13px;
  font-size: 14px; max-width: 100%; white-space: pre-wrap; word-break: break-word;
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble { background: var(--accent); color: #fff; border-radius: 15px 15px 4px 15px; }
.msg .who { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.chat-input { display: flex; gap: 9px; padding: 11px; border-top: 0.5px solid var(--line); }
.chat-input input { flex: 1; border: none; background: #f2f3f4; border-radius: 11px; padding: 10px 13px; outline: none; }

/* ---------- 工牌 ---------- */
.badge-card {
  border-radius: 22px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #4fa294, #2b6a60);
  box-shadow: 0 14px 40px rgba(43, 106, 96, .26);
}
.badge-card::after {
  content: ""; position: absolute; right: -46px; top: -56px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.badge-top { display: flex; align-items: center; gap: 13px; }
.badge-top .av { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.badge-name { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.badge-title { font-size: 12.5px; opacity: .85; }
.badge-meta { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 12.5px; }
.badge-meta .k { opacity: .68; font-size: 11px; }
.badge-meta .v { font-weight: 500; margin-top: 1px; }
.qr-box { background: #fff; border-radius: 18px; padding: 18px 16px 14px; text-align: center; margin-top: 14px; }
.qr-box .qr { width: 200px; height: 200px; margin: 0 auto; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.qr-tip { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* ---------- 考勤 ---------- */
.att-summary { display: flex; gap: 11px; }
.att-big { font-size: 30px; font-weight: 600; letter-spacing: -.8px; }

/* ---------- 我的 ---------- */
.profile { display: flex; align-items: center; gap: 15px; padding: 22px 18px; }
.profile .nm { font-size: 19px; font-weight: 600; letter-spacing: -.3px; }
.profile .ti { font-size: 13px; color: var(--text-3); }

/* ---------- 移动端 ---------- */
.tabbar { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 18px 16px 96px; max-width: 100%; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
    position: sticky; top: 0; z-index: 20;
    background: rgba(244, 245, 246, .82);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 0.5px solid var(--line);
  }
  .topbar .tt { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
  .page-title { font-size: 24px; }
  .hello h1 { font-size: 25px; }
  .grid4 { gap: 9px; }
  .quick { padding: 13px 4px 11px; }
  .quick .qi { width: 34px; height: 34px; }
  .quick span { font-size: 11.5px; }
  .stat { padding: 12px 13px; }
  .stat .n { font-size: 20px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(22px);
    border-top: 0.5px solid var(--line);
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0; color: var(--text-3); font-size: 10.5px; cursor: pointer;
  }
  .tab.on { color: var(--accent-deep); }
  .tab .ic { width: 21px; height: 21px; }
  .tab .dotb {
    position: absolute; margin-left: 16px; margin-top: -2px;
    width: 7px; height: 7px; border-radius: 50%; background: #e8543f;
  }

  .chat-wrap { height: calc(100vh - 190px); }
  .chat-list { display: block; width: 100%; }
  .member-grid { gap: 8px; }
  .member { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .detail-grid { grid-template-columns: 84px 1fr; }
  .badge-meta { grid-template-columns: 1fr 1fr; }
}

.fade-enter-active, .fade-leave-active { transition: opacity .16s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(120% 80% at 50% 0%, #eef4f2 0%, #f4f5f6 60%);
}
.login-card {
  width: 100%; max-width: 372px; background: #fff; border-radius: 22px;
  padding: 32px 26px 26px; box-shadow: 0 18px 50px rgba(0, 0, 0, .07);
}
.login-logo {
  width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 18px;
  background: linear-gradient(145deg, #4fa294, #2f6f64);
  color: #fff; font-size: 19px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; letter-spacing: -.6px;
}
.login-card h1 { font-size: 21px; font-weight: 600; text-align: center; margin: 0 0 4px; letter-spacing: -.4px; }
.login-card p { text-align: center; color: var(--text-3); font-size: 13px; margin: 0 0 22px; }
.err-line { color: var(--bad); font-size: 13px; margin: -6px 0 12px 3px; }

/* ---------- 弹层与提示 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: center; justify-content: center; padding: 22px;
  background: rgba(0, 0, 0, .26); backdrop-filter: blur(3px);
}
.sheet {
  width: 100%; max-width: 336px; background: #fff;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
  animation: sheetIn .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 88px);
  background: rgba(24, 24, 26, .92); color: #fff;
  padding: 9px 17px; border-radius: 12px; font-size: 13.5px;
  z-index: 100; max-width: 80vw; text-align: center;
  backdrop-filter: blur(10px);
}
@media (min-width: 861px) { .toast { bottom: 34px; } }

@media (max-width: 860px) {
  .sheet-mask { align-items: flex-end; padding: 0; }
  .sheet { max-width: 100%; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
