﻿/* =========================================================================
   styles/worker.css —— 员工端外壳（H5 390×844）
   V1 的问题：没有底部 Tab、首屏即被内容截断、主操作埋在内容里、无安全区
   V2 的规则：状态栏 24 / 固定顶栏 56 / 滚动内容 / 固定主操作条(可选) / 固定 Tab 64 / 安全区 18
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.h5 {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: #e6e7e1;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, h4 { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* ---------- 演示画布 ---------- */
.mock {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 28px 16px;
}
.mock__cap { width: 390px; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #5c6a60; }
.mock__cap b { color: var(--brand-800); font-size: 15px; }
.mock__nav { display: flex; gap: 6px; }
.mock__nav a { padding: 5px 11px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line-strong); font-size: 12px; }
.mock__nav a.is-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.phone {
  position: relative;
  width: 390px; height: 844px;
  display: grid;
  /* 底部 Tab 行高度写死（64 + 安全区 18），避免 auto 行在部分内核下被裁切 */
  grid-template-rows: 24px var(--h5-topbar-h) minmax(0, 1fr) calc(var(--h5-tabbar-h) + var(--h5-safe-bottom));
  overflow: hidden;
  border-radius: 28px;
  background: var(--page-h5);
  box-shadow: var(--sh-3);
}
.phone--with-bar { grid-template-rows: 24px var(--h5-topbar-h) minmax(0, 1fr) var(--h5-actionbar-h) calc(var(--h5-tabbar-h) + var(--h5-safe-bottom)); }

/* ---------- 状态栏 24 ---------- */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: var(--fs-12); font-weight: 700; color: var(--ink-900);
}
.statusbar__icons { letter-spacing: 2px; font-size: 10px; }

/* ---------- 顶栏 56（固定在状态栏下，内容不跟着滚） ---------- */
.h5-top {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line);
}
.h5-top--brand { background: var(--brand-800); border-bottom-color: var(--brand-800); color: #fff; }
.h5-top__back {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--surface-2); font-size: 14px; color: var(--ink-700);
}
.h5-top__title { font-size: var(--fs-16); font-weight: 800; flex: 1; min-width: 0; }
.h5-top__sub { font-size: var(--fs-11); color: var(--ink-500); }
.h5-top--brand .h5-top__sub { color: #a9c2ad; }
.h5-top__act { font-size: var(--fs-12); font-weight: 700; color: var(--brand-600); }
.h5-top--brand .h5-top__act { color: #cfe0c8; }

/* ---------- 内容滚动区 ---------- */
.h5-body {
  min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 14px 16px;
  background: var(--page-h5);
}

.h5-body::-webkit-scrollbar, .sidebar__scroll::-webkit-scrollbar,
.card__body::-webkit-scrollbar, .col::-webkit-scrollbar { width: 0; }

.sec-title { display: flex; align-items: center; gap: 8px; margin: 2px 2px 0; }
.sec-title b { font-size: var(--fs-14); font-weight: 800; }
.sec-title span { margin-left: auto; font-size: var(--fs-12); color: var(--ink-500); }

/* ---------- 首页 hero 卡（承载"上班打卡"主操作） ---------- */
.hero {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  color: #fff; box-shadow: var(--sh-2);
}
.hero__info { flex: 1; min-width: 0; }
.hero__label { font-size: var(--fs-12); color: #cfe0c8; }
.hero__time { font-family: var(--font-num); font-size: var(--fs-28); font-weight: 800; line-height: 1.15; }
.hero__note { font-size: var(--fs-12); color: #d7e5d3; }
.hero__btn {
  height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: #fff; color: var(--brand-700); font-size: var(--fs-14); font-weight: 800;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}

/* ---------- 卡片 ---------- */
.h5-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: var(--r-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.h5-card--alert { background: var(--warn-bg); border-color: var(--warn-line); }
.h5-alert-summary { gap:6px; }
.h5-alert-summary__text { font-size:var(--fs-14); font-weight:800; line-height:1.4; }
.h5-card__head { display: flex; align-items: center; gap: 8px; }
.h5-card__title { font-size: var(--fs-14); font-weight: 800; }
.h5-card__more { margin-left: auto; font-size: var(--fs-12); color: var(--ink-500); }
.h5-row { display: flex; align-items: center; gap: 10px; }
.h5-row + .h5-row { padding-top: 10px; border-top: 1px dashed var(--line); }
.h5-row__main { flex: 1; min-width: 0; }
.h5-row__title { font-size: var(--fs-14); font-weight: 700; }
.h5-row__sub { font-size: var(--fs-12); color: var(--ink-500); margin-top: 2px; }
.h5-row__side { font-size: var(--fs-12); color: var(--ink-500); text-align: right; }

/* ---------- 消息中心：先行动，再安排，最后留痕 ---------- */
.h5-message-body { gap: 14px; padding-top: 16px; }
.message-summary { display:flex; align-items:center; gap:10px; padding:13px 14px; border-radius:var(--r-lg); background:var(--brand-50); border:1px solid var(--brand-100); }
.message-summary b { font-size:var(--fs-14); color:var(--brand-800); }
.message-summary span { margin-left:auto; font-size:var(--fs-12); color:var(--brand-600); }
.message-section { display:flex; flex-direction:column; gap:8px; }
.message-section__head { display:flex; align-items:center; padding:0 2px; }
.message-section__head b { font-size:var(--fs-14); }
.message-section__head span { margin-left:auto; font-size:var(--fs-12); color:var(--ink-500); }
.message-item { display:flex; align-items:flex-start; gap:10px; padding:13px; border-radius:var(--r-lg); background:#fff; border:1px solid var(--line); box-shadow:var(--sh-1); }
.message-item--urgent { background:#fff8ee; border-color:var(--warn-line); }
.message-item--schedule { background:#f4f8f1; border-color:var(--brand-100); }
.message-item__mark { flex:none; width:8px; height:8px; margin-top:6px; border-radius:50%; background:var(--brand-600); }
.message-item--urgent .message-item__mark { background:var(--danger); }
.message-item__main { flex:1; min-width:0; }
.message-item__meta { display:flex; align-items:center; gap:7px; font-size:var(--fs-11); color:var(--ink-500); }
.message-item__title { margin-top:4px; font-size:var(--fs-14); font-weight:800; line-height:1.45; }
.message-item__text { margin-top:3px; font-size:var(--fs-12); line-height:1.5; color:var(--ink-700); }
.message-item__link { display:inline-block; margin-top:7px; font-size:var(--fs-12); font-weight:800; color:var(--brand-600); }
.message-item__side { flex:none; font-size:var(--fs-11); color:var(--ink-500); white-space:nowrap; }
.message-empty { padding:22px 14px; border-radius:var(--r-lg); background:#fff; border:1px dashed var(--line-strong); text-align:center; font-size:var(--fs-13); color:var(--ink-500); }

/* 任务卡：一眼看清"哪块地 + 干什么 + 干多少" */
.tcard-h5 {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
}
.tcard-h5--focus { background: #fff; border-color: var(--brand-200); box-shadow: 0 0 0 3px var(--brand-50); }
.tcard-h5__top { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--ink-500); }
.tcard-h5__name { font-size: var(--fs-16); font-weight: 800; }
.tcard-h5__spec { display: flex; gap: 14px; font-size: var(--fs-12); color: var(--ink-700); }
.tcard-h5__spec b { font-family: var(--font-num); }

/* 步骤清单 */
.steps { display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.steps li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--line); font-size: var(--fs-13);
}
.steps li::before {
  counter-increment: s; content: counter(s);
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-600);
  font-size: var(--fs-11); font-weight: 800; line-height: 20px; text-align: center;
}
.steps li.is-done::before { content: "✓"; background: var(--ok); color: #fff; }
.steps li.is-done { color: var(--ink-500); }

/* 金额条 */
.money { display: flex; align-items: baseline; gap: 6px; }
.money__val { font-family: var(--font-num); font-size: var(--fs-24); font-weight: 800; color: var(--brand-600); }
.money__unit { font-size: var(--fs-12); color: var(--ink-500); }
.money__hint { margin-left: auto; font-size: var(--fs-12); color: var(--ink-500); }

/* ---------- 固定底部主操作条 54 ---------- */
.h5-actionbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: #fff; border-top: 1px solid var(--line);
}
.btn-h5 {
  flex: 1; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-14); font-weight: 800;
  background: var(--brand-600); color: #fff;
}
.btn-h5--ghost { background: var(--surface-2); color: var(--ink-700); border: 1px solid var(--line-strong); flex: none; padding: 0 16px; }

/* ---------- 固定底部 Tab 64 + 安全区 18 ---------- */
.h5-tabbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: var(--h5-safe-bottom);
  background: #fff; border-top: 1px solid var(--line);
}
.h5-tabbar a {
  height: var(--h5-tabbar-h); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: var(--fs-11); color: var(--ink-500);
}
.h5-tabbar a i { font-size: 17px; font-style: normal; line-height: 1; }
.h5-tabbar a.is-on { color: var(--brand-600); font-weight: 800; }
.h5-safe { height: var(--h5-safe-bottom); background: #fff; grid-column: 1 / -1; display: none; }

/* ---------- 打卡页 ---------- */
.clock { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 8px 0; }
.clock__addr {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--ok-bg); color: var(--ok); font-size: var(--fs-12); font-weight: 700;
}
.clock__ring {
  width: 220px; height: 220px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #f2f7ef 0 58%, var(--brand-200) 58% 62%, #eaf1e6 62%);
  border: 2px solid var(--brand-200);
}
.clock__ring-inner { text-align: center; }
.clock__time { font-family: var(--font-num); font-size: var(--fs-28); font-weight: 800; }
.clock__date { font-size: var(--fs-12); color: var(--ink-500); }
.clock__hint { font-size: var(--fs-13); color: var(--ink-500); }
.clock__done { font-size: var(--fs-12); color: var(--ink-500); }
.clock__summary { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clock__cell { padding: 10px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); text-align: center; }
.clock__cell span { display: block; font-size: var(--fs-11); color: var(--ink-500); }
.clock__cell b { font-family: var(--font-num); font-size: var(--fs-18); }


