/* 员工工作管理 · 手机端样式 */
:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --line: #e5e8ef;
  --txt: #1c2333;
  --sub: #6b7486;
  --pri: #1d4ed8;
  --pri-weak: #e8eefe;
  --ok: #128a4d;
  --ok-weak: #e3f5ea;
  --warn: #b45309;
  --warn-weak: #fdf1de;
  --danger: #c02626;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--txt); font-size: 15px; line-height: 1.5;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100%; padding-bottom: 76px; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff; padding: 14px 16px 12px;
}
.top .row { display: flex; align-items: center; gap: 10px; }
.top h1 { font-size: 17px; font-weight: 600; flex: 1; }
.top .who { font-size: 12px; opacity: .85; }
.top .logout {
  background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 8px;
  padding: 6px 12px; font-size: 13px;
}

/* 底部导航 */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  flex: 1; background: none; border: 0; padding: 9px 0 8px;
  font-size: 11px; color: var(--sub); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabs button .ic { font-size: 19px; line-height: 1; }
.tabs button.on { color: var(--pri); font-weight: 600; }

/* 卡片 */
.wrap { padding: 12px; }
.card { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,30,60,.06); }
.card h2 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card h2 .sp { flex: 1; }
.hint { font-size: 12px; color: var(--sub); }

/* 表单 */
.f-row { margin-bottom: 10px; }
.f-row label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.f-row input, .f-row select, .f-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font-size: 15px; background: #fafbfd; color: var(--txt); outline: none;
}
.f-row input:focus, .f-row select:focus, .f-row textarea:focus { border-color: var(--pri); background: #fff; }
.f-row textarea { min-height: 76px; resize: vertical; }
.f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* 按钮 */
.btn {
  display: inline-block; border: 0; border-radius: 9px; padding: 11px 16px;
  font-size: 15px; font-weight: 500; background: var(--pri); color: #fff; text-align: center;
}
.btn:active { opacity: .85; }
.btn.w { width: 100%; }
.btn.ghost { background: var(--pri-weak); color: var(--pri); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 7px; }
.btn.danger { background: #fdeaea; color: var(--danger); }
.btn:disabled { opacity: .5; }

/* 列表项 */
.item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; background: #fff; }
.item .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.item .hd b { font-size: 14px; }
.item .tm { font-size: 12px; color: var(--pri); background: var(--pri-weak); border-radius: 6px; padding: 1px 7px; }
.item .qty { font-size: 12px; color: var(--ok); background: var(--ok-weak); border-radius: 6px; padding: 1px 7px; }
.item .ct { font-size: 14px; margin: 3px 0; }
.item .nt { font-size: 12px; color: var(--sub); }
.item .ops { margin-top: 7px; display: flex; gap: 8px; justify-content: flex-end; }

/* 徽标 */
.tag { font-size: 11px; border-radius: 6px; padding: 2px 8px; background: var(--pri-weak); color: var(--pri); }
.tag.gray { background: #eef0f4; color: var(--sub); }
.tag.ok { background: var(--ok-weak); color: var(--ok); }
.tag.warn { background: var(--warn-weak); color: var(--warn); }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: 12px; padding: 11px 10px; text-align: center; box-shadow: 0 1px 3px rgba(20,30,60,.06); }
.stat .v { font-size: 19px; font-weight: 700; color: var(--pri); }
.stat .k { font-size: 11px; color: var(--sub); margin-top: 2px; }

/* 员工行 */
.emp { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.emp:last-child { border-bottom: 0; }
.emp .av {
  width: 40px; height: 40px; border-radius: 50%; background: var(--pri-weak); color: var(--pri);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; flex: none;
}
.emp .info { flex: 1; min-width: 0; }
.emp .info b { font-size: 14px; }
.emp .info .s { font-size: 12px; color: var(--sub); }
.emp .arr { color: #c3c9d6; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(10,15,30,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; }
.sheet h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; }
.sheet h3 .x { margin-left: auto; background: #eef0f4; border: 0; border-radius: 50%; width: 28px; height: 28px; color: var(--sub); font-size: 14px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,28,45,.92); color: #fff; padding: 9px 18px; border-radius: 9px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 82vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(160,25,25,.95); }

.empty { text-align: center; color: var(--sub); font-size: 13px; padding: 26px 0; }
.sec-t { font-size: 13px; color: var(--sub); margin: 14px 2px 8px; }
.duty-li { display: flex; gap: 8px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.duty-li:last-child { border-bottom: 0; }
.duty-li .dn { flex: 1; }
.duty-li .dn b { font-size: 14px; }
.duty-li .dn .d { font-size: 12px; color: var(--sub); }

/* 登录页满屏渐变 */
.login {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 22px; background: linear-gradient(160deg, #1d4ed8, #3b82f6 60%, #60a5fa);
  position: relative; box-sizing: border-box;
}
.top .who { font-size: 12px; opacity: .85; margin-top: 3px; }
.login .logout { background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; }

/* 日期切换条 */
.dnav { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.dnav input { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 15px; background: #fafbfd; color: var(--txt); }
.dnav .btn { flex: none; min-width: 40px; }

/* 时段卡片 */
.slot { background: var(--card); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(20,30,60,.06); border-left: 4px solid #cbd5e1; }
.slot.done { border-left-color: var(--ok); }
.slot-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot-no { font-size: 14px; font-weight: 700; }
.slot-rg { font-size: 12px; color: var(--pri); background: var(--pri-weak); border-radius: 6px; padding: 1px 7px; }
.slot-ct { font-size: 14px; margin-top: 7px; white-space: pre-wrap; }
.slot-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.slot-nt { font-size: 12px; color: var(--sub); margin-top: 5px; }
.slot-ops { display: flex; gap: 8px; margin-top: 10px; }
.slot-ops .btn { flex: none; }

/* 我的 */
.me-hd { display: flex; align-items: center; gap: 12px; }
.me-hd .av { width: 48px; height: 48px; border-radius: 50%; background: var(--pri-weak); color: var(--pri); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
