/* ============================================================
   工作流程管理系统 - 员工端 H5 移动端样式
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff4ff;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px; line-height: 1.6; color: var(--gray-800);
    background: var(--gray-100); padding-bottom: 60px;
}
a { color: var(--primary); text-decoration: none; }

/* 顶部栏 */
.h5-header {
    position: sticky; top: 0; z-index: 50; background: var(--primary); color: #fff;
    padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.h5-header .title { font-size: 17px; font-weight: 600; }
.h5-header .sub { font-size: 12px; opacity: .85; }
.h5-header .back { color: #fff; background: none; border: none; font-size: 15px; display: flex; align-items: center; gap: 4px; cursor: pointer; }

.h5-content { padding: 14px; }

/* 底部导航 */
.h5-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff;
    border-top: 1px solid var(--gray-200); display: flex; z-index: 100;
}
.h5-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: var(--gray-400); font-size: 11px;
}
.h5-tabbar a.active { color: var(--primary); }
.h5-tabbar a svg { width: 22px; height: 22px; }

/* 卡片 */
.h5-card { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.h5-card .card-title { font-size: 15px; font-weight: 600; color: var(--gray-900); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.h5-card .card-title .tag { font-size: 12px; font-weight: 400; color: var(--gray-500); }

/* 统计块 */
.stat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.stat-box { flex: 1; background: #fff; border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-box .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-box .num.green { color: var(--success); }
.stat-box .num.orange { color: var(--warning); }
.stat-box .lbl { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* 流程节点时间线 */
.flow-timeline { position: relative; padding-left: 4px; }
.flow-node { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.flow-node .dot-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.flow-node .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gray-300); background: #fff; display: flex; align-items: center; justify-content: center; z-index: 1; }
.flow-node.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.flow-node.current .dot { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.flow-node .line { flex: 1; width: 2px; background: var(--gray-200); margin: 2px 0; }
.flow-node.done .line { background: var(--success); }
.flow-node .node-body { flex: 1; min-width: 0; }
.flow-node .node-name { font-weight: 600; color: var(--gray-800); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.flow-node .node-name .req { color: var(--danger); font-size: 12px; }
.flow-node .node-desc { font-size: 13px; color: var(--gray-500); margin-top: 3px; }
.flow-node .node-time { font-size: 12px; color: var(--success); margin-top: 4px; }
.flow-node .node-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 按钮 */
.h5-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 8px; border: none; font-size: 15px; font-weight: 500;
    cursor: pointer; background: var(--primary); color: #fff; font-family: inherit;
}
.h5-btn:active { opacity: .85; }
.h5-btn:disabled { opacity: .5; }
.h5-btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.h5-btn.gray { background: var(--gray-200); color: var(--gray-600); }
.h5-btn.success { background: var(--success); }
.h5-btn.block { width: 100%; }
.h5-btn.sm { padding: 6px 14px; font-size: 13px; }
.h5-btn.lg { padding: 13px; font-size: 16px; }

/* 表单 */
.h5-form .form-item { margin-bottom: 16px; }
.h5-form label { display: block; font-size: 14px; font-weight: 500; color: var(--gray-700); margin-bottom: 7px; }
.h5-form label .req { color: var(--danger); }
.h5-input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--gray-300); border-radius: 8px;
    font-size: 15px; background: #fff; color: var(--gray-800); font-family: inherit;
}
.h5-input:focus { outline: none; border-color: var(--primary); }
textarea.h5-input { min-height: 90px; resize: vertical; }

/* 列表 */
.h5-list { background: #fff; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.h5-list .list-item { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h5-list .list-item:last-child { border-bottom: none; }
.h5-list .list-item .li-main { flex: 1; min-width: 0; }
.h5-list .list-item .li-title { font-size: 15px; color: var(--gray-800); font-weight: 500; }
.h5-list .list-item .li-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* 徽章 */
.h5-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.h5-badge.blue { background: var(--primary-light); color: var(--primary); }
.h5-badge.green { background: #e8f7ee; color: var(--success); }
.h5-badge.orange { background: #fef3e2; color: var(--warning); }
.h5-badge.red { background: #fdeaea; color: var(--danger); }
.h5-badge.gray { background: var(--gray-100); color: var(--gray-500); }

/* 空状态 */
.h5-empty { text-align: center; padding: 50px 20px; color: var(--gray-400); }
.h5-empty svg { margin-bottom: 12px; opacity: .4; }

/* 登录 */
.h5-login { min-height: 100vh; background: linear-gradient(160deg, #2563eb 0%, #1e40af 40%, #f3f4f6 40%); padding: 0 20px; }
.h5-login .login-head { text-align: center; color: #fff; padding: 50px 0 34px; }
.h5-login .login-head .logo { width: 60px; height: 60px; margin: 0 auto 14px; background: rgba(255,255,255,.2); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.h5-login .login-head h1 { font-size: 21px; font-weight: 700; }
.h5-login .login-head p { font-size: 13px; opacity: .85; margin-top: 5px; }
.h5-login .login-card { background: #fff; border-radius: 16px; padding: 26px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.1); }

/* 提醒消息 */
.notice-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.notice-item:last-child { border-bottom: none; }
.notice-item .n-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notice-item .n-body { flex: 1; min-width: 0; }
.notice-item .n-title { font-size: 14px; font-weight: 500; color: var(--gray-800); }
.notice-item .n-text { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.notice-item .n-time { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* Toast */
.h5-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.8); color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 14px; z-index: 3000; max-width: 80vw; text-align: center; }

/* 分段控件 */
.h5-segment { display: flex; background: var(--gray-200); border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.h5-segment button { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 6px; font-size: 14px; color: var(--gray-600); cursor: pointer; }
.h5-segment button.active { background: #fff; color: var(--primary); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* Toast (复用 common.js WF.toast) */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { padding: 11px 20px; border-radius: 8px; color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: flex; align-items: center; gap: 8px; max-width: 90vw; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--gray-700); }

/* 进度条 */
.h5-progress { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.h5-progress .fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }

/* 提示条 */
.h5-alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 9px; align-items: flex-start; }
.h5-alert.info { background: var(--primary-light); color: var(--primary-dark); }
.h5-alert.warn { background: #fef3e2; color: #92600a; }
.h5-alert.danger { background: #fdeaea; color: #b91c1c; }
