/* ==========================================================================
 * 工程管理系统 · 移动端 H5 —— 业务页面样式
 * 按页面分节：登录 / 工作台 / 项目 / 项目详情 / 待办 / 记工 / 我的
 * ========================================================================== */

/* ==========================================================================
 * A. 登录（企业登录 · 多租户）
 * ========================================================================== */
.login {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 var(--gutter) calc(18px + var(--safe-b));
  background: #f6f8fc;
  overflow: hidden;
}

/* 顶部渐变：只占上半屏，下方留白给表单卡，避免大面积色块压住输入框 */
.login__bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  background: linear-gradient(155deg, #3d78ff 0%, #2f6bff 42%, #4a63e8 100%);
  border-radius: 0 0 32px 32px;
}

.login__bg::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
}

.login__bg::before {
  content: "";
  position: absolute;
  bottom: -50px;
  left: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.login__hd {
  position: relative;
  padding-top: calc(58px + var(--safe-t));
  color: #fff;
}

.login__logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

/* 企业 logo 由后台「网站配置」下发，比例不可控：铺满 + 裁切，比留白好看 */
.login__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login__title {
  margin-top: 18px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.3;
  /* 企业自定义站名可能很长（如「XX建设集团项目管理系统」），最多两行，超出省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.login__sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.3px;
}

.login__card {
  position: relative;
  margin-top: 26px;
  padding: 20px 18px 18px;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: 0 18px 40px rgba(18, 39, 82, 0.12);
}

.login__card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.login__card-hd h2 {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink-900);
}

.login__hint {
  margin-top: -6px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--ink-400);
  line-height: 1.5;
}

.login__err {
  display: none;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--danger-50);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.45;
}

.login__err.is-on {
  display: block;
  animation: shake 0.32s var(--ease);
}

@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}

.login__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--ink-300);
  font-size: 11.5px;
}

.login__or::before,
.login__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login__ft {
  position: relative;
  margin-top: auto;
  padding-top: 26px;
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-400);
}

.login__ft a {
  color: var(--ink-400);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line-strong);
}

/* ==========================================================================
 * B. 工作台
 * ========================================================================== */
/* 头部：四段蓝渐变 + 弧形底边，与小程序首页同一套（--hero-top/upper/mid/tail）。
 *
 * 为什么末端停在 #d6e9ff 而不是化进页面底色 --bg：一条渐变如果结尾就是底色，
 * 蓝区的边就"没有边"，弧画多深都看不出来。代价是文字要跟着加深一档 ——
 * 白字压不住 #d6e9ff，所以企业名走 --ink-900、副文案走 --ink-600。
 *
 * 弧形：一块**页面底色**的椭圆（::after）压在头部底边，把蓝区中间"啃"出一道弧。
 * 椭圆左右各 -3%（宽 106%），圆心压在底边上（bottom: -18px），所以头部内只剩
 * 上半部分 —— 屏幕只占椭圆中间约 91%，两端被裁在屏幕外，切线是斜的，
 * 于是看不到"两个圆角"，只有一道从边缘平滑升到中点的弯。
 */
.hero {
  position: relative;
  padding: calc(14px + var(--safe-t)) var(--gutter) 40px;
  color: var(--ink-900);
  background-image: linear-gradient(
    180deg,
    #2f86f0 0%,
    #63a6f9 36%,
    #a8ccfd 70%,
    #d6e9ff 100%
  );
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  left: -3%;
  width: 106%;
  height: 36px;
  bottom: -18px;
  border-radius: 50%;
  background: var(--bg);
}

/* 原来那颗白色径向光斑是给深蓝底提亮的，现在底色很浅，留着只会糊成一块白 */
.hero__glow {
  display: none;
}

.hero__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tenant {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tenant__logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-700);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.tenant__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tenant__info {
  min-width: 0;
}

.tenant__name {
  color: var(--ink-900);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.tenant__plan {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-700);
}

.tenant__plan i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.hero__bell {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.58);
  transition: background 0.15s;
}

.hero__bell:active {
  background: rgba(255, 255, 255, 0.8);
}

.hero__bell-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 0 2px rgba(214, 233, 255, 0.95);
}

.hero__greet {
  position: relative;
  margin-top: 22px;
}

.hero__greet h1 {
  color: var(--ink-900);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.hero__greet p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-600);
}

/* 卡片不再压在蓝区上：弧形底边之下一小段页面底色，卡片再从底色上浮起来 ——
   与小程序一致（不是在弧上盖卡片，否则弧永远只露半边） */
.home-body {
  position: relative;
  margin-top: 4px;
  padding-bottom: 8px;
}

/* ---- 指标卡 ---- */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 var(--gutter);
}

.metric {
  position: relative;
  padding: 13px 13px 12px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: transform 0.14s var(--ease);
}

.metric:active {
  transform: scale(0.98);
}

.metric__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-400);
  white-space: nowrap;
}

.metric__label svg {
  color: var(--ink-300);
}

.metric__value {
  margin-top: 7px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-900);
  letter-spacing: -0.4px;
}

.metric__unit {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
  letter-spacing: 0;
}

.metric__extra {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric__extra b {
  font-weight: 600;
  color: var(--ink-600);
}

.metric--warn .metric__value {
  color: var(--warn);
}
.metric--danger .metric__value {
  color: var(--danger);
}
.metric--ok .metric__value {
  color: var(--ok);
}

/* ---- 快捷入口 ---- */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 0;
  padding: 14px 6px 6px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 8px 2px;
  border-radius: 12px;
  transition: background 0.15s;
}

.quick__item:active {
  background: var(--surface-2);
}

.quick__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-50);
}

.quick__ico--amber {
  color: #d97706;
  background: var(--warn-50);
}
.quick__ico--violet {
  color: var(--violet);
  background: var(--violet-50);
}
.quick__ico--teal {
  color: var(--teal);
  background: var(--teal-50);
}
.quick__ico--ok {
  color: var(--ok);
  background: var(--ok-50);
}
.quick__ico--pink {
  color: #e04f7a;
  background: #fdeef3;
}

.quick__label {
  font-size: 11.5px;
  color: var(--ink-600);
  letter-spacing: 0.1px;
}

/**
 * 「只能在桌面端做」的入口：不隐藏（用户要知道这些功能存在、数据在哪看），
 * 但视觉上降一级 —— 图标与文字都转灰、右上角挂一个「桌面」角标。
 * 只靠点击后弹说明是不够的：不点的人会以为点得动。
 */
.quick__item--desk {
  position: relative;
}

.quick__item--desk .quick__ico {
  position: relative;
  color: var(--ink-400);
  background: #f2f4f8;
}

.quick__item--desk .quick__label {
  color: var(--ink-400);
}

.quick__badge {
  position: absolute;
  top: -5px;
  right: -9px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 9px;
  font-style: normal;
  line-height: 15px;
  color: #fff;
  background: #b9c2d0;
  letter-spacing: 0.2px;
  box-shadow: 0 0 0 1.5px #fff;
}

/* ---- 趋势图 ---- */
.trend {
  width: 100%;
  height: auto;
  display: block;
}

/* 整列可点：透明命中区，命中后弹当月明细（见 pages/home.js） */
.trend__hit {
  cursor: pointer;
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.trend-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}

/* ---- 项目进展（横向滚动） ---- */
.proj-scroll {
  display: flex;
  gap: 10px;
  padding: 2px var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.proj-scroll::-webkit-scrollbar {
  display: none;
}

.proj-card {
  flex: none;
  width: 232px;
  padding: 13px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  scroll-snap-align: start;
  transition: transform 0.14s var(--ease);
}

.proj-card:active {
  transform: scale(0.985);
}

.proj-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.proj-card__name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proj-card__meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-400);
}

.proj-card__foot b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

/* ---- 进度条 ---- */
.bar {
  position: relative;
  height: 6px;
  margin-top: 9px;
  border-radius: 3px;
  background: #eef1f7;
  overflow: hidden;
}

.bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #4b83ff, #2f6bff);
  transition: width 0.5s var(--ease);
}

.bar__fill--warn {
  background: linear-gradient(90deg, #f7b955, #d97706);
}

.bar__fill--ok {
  background: linear-gradient(90deg, #34d17f, #16a34a);
}

/* ---- 待办行（首页复用） ---- */
.todo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  background: #fff;
}

.todo + .todo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 0;
  height: 1px;
  background: var(--line);
}

.todo__bar {
  flex: none;
  width: 3px;
  height: 30px;
  border-radius: 2px;
  background: var(--warn);
}

.todo__bar--danger {
  background: var(--danger);
}

.todo__main {
  flex: 1;
  min-width: 0;
}

.todo__title {
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.4;
  color: var(--ink-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.todo__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-400);
}

.todo__days {
  flex: none;
  font-size: 12px;
  font-weight: 650;
  color: var(--warn);
  font-variant-numeric: tabular-nums;
}

.todo__days--danger {
  color: var(--danger);
}

/* ==========================================================================
 * C. 项目列表
 * ========================================================================== */
.page-hd {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + var(--safe-t)) var(--gutter) 10px;
  background: rgba(244, 246, 250, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.page-hd__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-hd__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: 0.3px;
}

.page-hd__sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink-500);
  background: #fff;
  box-shadow: var(--sh-1);
}

.icon-btn:active {
  background: var(--surface-2);
}

.search {
  position: relative;
  margin-top: 12px;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--ink-300);
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--sh-1);
  font-size: 14px;
  outline: none;
}

.search input::placeholder {
  color: var(--ink-300);
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}

/* 只有真的能横向滚动时才做右缘淡出（由 ui.js 的 markScrollable 打标） */
.chips.is-scrollable {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  background: #fff;
  color: var(--ink-500);
  font-size: 12.5px;
  font-weight: 550;
  box-shadow: var(--sh-1);
  transition: all 0.16s var(--ease);
}

.chip.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.28);
}

.list-wrap {
  padding: 4px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pcard {
  padding: 14px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform 0.14s var(--ease), box-shadow 0.16s;
}

.pcard:active {
  transform: scale(0.988);
  box-shadow: var(--sh-2);
}

.pcard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pcard__name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard__meta i {
  width: 1px;
  height: 9px;
  background: var(--line-strong);
  flex: none;
}

.pcard__nums {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.pcard__amt {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.pcard__amt small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
  margin-left: 3px;
  letter-spacing: 0;
}

.pcard__rate {
  font-size: 11.5px;
  color: var(--ink-400);
  text-align: right;
  line-height: 1.4;
}

.pcard__rate b {
  display: block;
  font-size: 14px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
 * D. 项目详情
 * ========================================================================== */
.detail-hero {
  position: relative;
  margin: 0 var(--gutter);
  padding: 18px 16px 16px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(145deg, #3f7bff 0%, #2f6bff 48%, #4c5fe0 100%);
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.24);
  overflow: hidden;
}

.detail-hero::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.detail-hero__tags {
  position: relative;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-hero__tags .tag {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.detail-hero__name {
  position: relative;
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.detail-hero__meta {
  position: relative;
  margin-top: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.detail-hero__amt {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 14px;
}

.detail-hero__amt b {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.detail-hero__amt span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
}

/* KPI 四宫格 */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}

.kpi__label {
  font-size: 11.5px;
  color: var(--ink-400);
}

.kpi__value {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.kpi__value small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
  margin-left: 2px;
}

.kpi__value--brand {
  color: var(--brand);
}
.kpi__value--warn {
  color: var(--warn);
}
.kpi__value--ok {
  color: var(--ok);
}
.kpi__value--danger {
  color: var(--danger);
}

/* 回款进度环形 */
.ring-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.ring {
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
}

.ring svg {
  transform: rotate(-90deg);
}

.ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.ring__center b {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.ring__center span {
  font-size: 10.5px;
  color: var(--ink-400);
}

.ring-legend {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ring-legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-500);
}

.ring-legend__item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.ring-legend__item b {
  margin-left: auto;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

/* 节点时间轴 */
.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 10px;
  left: 6px;
  width: 2px;
  border-radius: 1px;
  background: var(--line);
}

.tl-item {
  position: relative;
  padding-bottom: 16px;
}

.tl-item:last-child {
  padding-bottom: 2px;
}

.tl-item__dot {
  position: absolute;
  top: 3px;
  left: -22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--line-strong);
}

.tl-item.is-done .tl-item__dot {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}

.tl-item.is-late .tl-item__dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-50);
}

.tl-item__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-item__name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-item__meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-400);
}

/* 成本构成条 */
.costbar + .costbar {
  margin-top: 12px;
}

.costbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-600);
}

.costbar__row b {
  font-weight: 650;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

.costbar__track {
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: #f0f3f9;
  overflow: hidden;
}

.costbar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #8fb3ff, var(--brand));
}

/* 回款流水行 */
.pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
}

.pay-row + .pay-row {
  border-top: 1px solid var(--line);
}

.pay-row__date {
  flex: none;
  width: 50px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--ink-300);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pay-row__date b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-700);
  letter-spacing: -0.2px;
}

.pay-row__main {
  flex: 1;
  min-width: 0;
}

.pay-row__main p {
  font-size: 13px;
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-row__main span {
  font-size: 11px;
  color: var(--ink-400);
}

.pay-row__amt {
  flex: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
 * E. 待办 / 提醒
 * ========================================================================== */
.todo-group {
  margin-top: 14px;
  padding: 0 var(--gutter);
}

.todo-group__hd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-500);
}

.todo-group__hd span {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #eef1f7;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.todo-card {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.todo-item {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 13px 13px 13px 14px;
}

.todo-item + .todo-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 0;
  height: 1px;
  background: var(--line);
}

.todo-item:active {
  background: var(--surface-2);
}

.todo-item__bar {
  flex: none;
  width: 3px;
  border-radius: 2px;
  background: var(--warn);
}

.todo-item__bar--danger {
  background: var(--danger);
}

.todo-item__bar--muted {
  background: var(--ink-300);
}

.todo-item__main {
  flex: 1;
  min-width: 0;
}

.todo-item__title {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  color: var(--ink-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.todo-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-400);
  flex-wrap: wrap;
}

.todo-item__right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding-top: 1px;
}

.todo-item__days {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--warn);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.todo-item__days--danger {
  color: var(--danger);
}

.todo-item__days--muted {
  color: var(--ink-400);
  font-weight: 600;
}

/* ==========================================================================
 * F. 现场记工
 * ========================================================================== */
.date-strip {
  display: flex;
  gap: 8px;
  padding: 2px var(--gutter) 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: none;
  width: 62px;
  padding: 8px 0 9px;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--sh-1);
  text-align: center;
  color: var(--ink-500);
  transition: all 0.16s var(--ease);
}

.date-pill b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

.date-pill span {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--ink-400);
}

.date-pill.is-active {
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}

.date-pill.is-active b,
.date-pill.is-active span {
  color: #fff;
}

/**
 * 「其他日期」：与三个固定日期并排，但视觉上是"动作"不是"日期" ——
 * 虚线描边 + 图标，避免用户以为它也是一天。
 */
.date-pill--more {
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px dashed var(--line-strong, #d5dce8);
  box-shadow: none;
  background: transparent;
  color: var(--ink-400);
  font-size: 10.5px;
}

.date-pill--more:active {
  background: var(--surface-2);
}

.wl-summary {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 6px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.wl-summary__item {
  flex: 1;
  text-align: center;
  position: relative;
}

.wl-summary__item + .wl-summary__item::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: var(--line);
}

.wl-summary__item b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.wl-summary__item span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-400);
}

.wl-summary__item--ok b {
  color: var(--ok);
}
.wl-summary__item--warn b {
  color: var(--warn);
}
.wl-summary__item--danger b {
  color: var(--danger);
}

.person {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #fff;
}

.person + .person::before {
  content: "";
  position: absolute;
  top: 0;
  left: 13px;
  right: 0;
  height: 1px;
  background: var(--line);
}

.person__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
  background: var(--brand-50);
}

.person__main {
  flex: 1;
  min-width: 0;
}

.person__name {
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person__sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  flex: none;
  height: 28px;
  min-width: 58px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.15s var(--ease);
}

.status-pill--present {
  color: var(--ok);
  background: var(--ok-50);
}
.status-pill--leave {
  color: var(--warn);
  background: var(--warn-50);
}
.status-pill--absent {
  color: var(--danger);
  background: var(--danger-50);
}
.status-pill--trip {
  color: var(--violet);
  background: var(--violet-50);
}
.status-pill--none {
  color: var(--ink-400);
  background: #f1f4fa;
}

.status-pill:active {
  transform: scale(0.96);
}

.savebar {
  position: fixed;
  z-index: 35;
  /* 抬到 tabbar 之上：两者都固定底部时，如果都贴 bottom:0，提交按钮会被导航栏整个盖住 */
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 26, 45, 0.05);
}

.savebar__info {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--ink-400);
  line-height: 1.4;
}

.savebar__info b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.savebar .btn {
  flex: none;
  width: 132px;
  height: 42px;
  font-size: 14.5px;
}

/**
 * 详情页底部操作条（项目详情 → 给本项目记工）
 *
 * 这一页 chrome 是 plain（没有 tabbar），所以直接贴底 + 安全区；
 * 页面本体留 86px 底部内边距，别让按钮压住"金额口径"那行小字。
 */
.detail-bar {
  position: fixed;
  z-index: 35;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  padding: 10px var(--gutter) calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 26, 45, 0.05);
}

/* 状态选择弹层 */
.opt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14.5px;
  color: var(--ink-800);
  box-shadow: inset 0 0 0 1px var(--line);
}

.opt i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.opt.is-active {
  box-shadow: inset 0 0 0 1.5px var(--brand);
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}

.opt__check {
  margin-left: auto;
  color: var(--brand);
}

/* ==========================================================================
 * G. 我的
 * ========================================================================== */
.me-hero {
  position: relative;
  padding: calc(18px + var(--safe-t)) var(--gutter) 64px;
  background: linear-gradient(150deg, #3f7bff 0%, #2f6bff 50%, #4559e0 100%);
  border-radius: 0 0 26px 26px;
  color: #fff;
  overflow: hidden;
}

.me-hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.me-hero__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}

.me-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36);
  overflow: hidden;
}

.me-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-hero__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.me-hero__name .tag {
  height: 20px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.me-hero__sub {
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
}

.me-body {
  position: relative;
  margin-top: -46px;
  padding: 0 var(--gutter) 8px;
}

.tenant-card {
  padding: 4px 14px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 13px;
}

.kv + .kv {
  border-top: 1px solid var(--line);
}

.kv__k {
  flex: none;
  color: var(--ink-400);
  font-size: 12.5px;
}

.kv__v {
  min-width: 0;
  text-align: right;
  font-weight: 550;
  color: var(--ink-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-note {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 11.5px;
  line-height: 1.55;
}

.tenant-note svg {
  flex: none;
  margin-top: 1px;
}

.me-list .row + .row::before {
  left: 56px;
}

.logout-btn {
  margin: 18px var(--gutter) 0;
}

.version {
  padding: 18px 0 calc(18px + var(--safe-b));
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-300);
}

/* 套餐到期提醒条（我的页顶部） */
.plan-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-50);
  color: #a35a05;
  font-size: 12px;
  line-height: 1.5;
}

.plan-warn b {
  font-weight: 700;
}
