:root{
  --green:#1a5c2a; --green2:#2a8a45; --green-soft:#eaf5ec;
  --bg:#f1f6f1; --card:#ffffff; --line:#e2ebe2; --line2:#eef3ee;
  --text:#1f2d24; --muted:#71837a; --muted2:#93a39a;
  --amber:#e08c1a; --red:#d64545; --blue:#2f7ed8; --purple:#7a5bd6;
  --shadow:0 1px 2px rgba(20,60,30,.05), 0 6px 20px rgba(20,60,30,.06);
  --radius:12px;
}
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
  font-family:"Microsoft YaHei","PingFang SC","Hiragino Sans GB",system-ui,-apple-system,sans-serif;
  background:var(--bg); color:var(--text); font-size:14px; -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-thumb{background:#cfdccf;border-radius:6px}
::-webkit-scrollbar-thumb:hover{background:#b9cbb9}
::-webkit-scrollbar-track{background:transparent}

/* ---------- 登录 ---------- */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(1100px 600px at 15% 10%, #dff0e2 0%, transparent 60%),
             radial-gradient(900px 500px at 90% 90%, #e6f2e8 0%, transparent 55%), #f6faf6;}
.login-card{width:390px;background:#fff;border-radius:18px;padding:38px 34px 30px;
  box-shadow:0 18px 60px rgba(20,70,35,.12), 0 2px 8px rgba(20,70,35,.05);border:1px solid #e8f0e8}
.login-card .logo{width:62px;height:62px;border-radius:18px;display:flex;align-items:center;justify-content:center;
  font-size:34px;background:linear-gradient(145deg,#e8f6ea,#d3ecd8);margin:0 auto 16px}
.login-card h1{font-size:21px;text-align:center;letter-spacing:.5px}
.login-card .sub{text-align:center;color:var(--muted);font-size:12.5px;margin:7px 0 26px}
/* 登录 / 注册页的使用说明入口：低调但好点，新窗口打开不丢已填的账号密码 */
.login-help{display:flex;align-items:center;justify-content:center;gap:7px;
  margin-top:16px;padding:12px 8px 0;border-top:1px solid #eef3ee;
  color:#2f5d50;font-size:13px;text-decoration:none;transition:color .15s}
.login-help:hover{color:#174b34}
.login-help .ic{flex:none;color:#5d8c75}
.login-help .lh-go{font-size:18px;line-height:1;color:#9bb6a7;transition:transform .15s,color .15s}
.login-help:hover .lh-go{color:#2f5d50;transform:translateX(3px)}
.login-help:focus-visible{outline:2px solid #2f5d50;outline-offset:3px;border-radius:4px}
.field{margin-bottom:15px}
.field label{display:block;font-size:13px;color:#4a5c50;margin-bottom:7px;font-weight:500}
.field input,.field select,.field textarea{width:100%;height:42px;border:1px solid #dde7dd;border-radius:9px;
  padding:0 13px;font-size:14px;background:#fbfdfb;transition:.15s;font-family:inherit;color:var(--text)}
.field textarea{height:70px;padding:10px 13px;resize:vertical;line-height:1.6}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--green2);
  background:#fff;box-shadow:0 0 0 3px rgba(42,138,69,.12)}
.btn{height:38px;padding:0 16px;border-radius:9px;border:1px solid transparent;font-size:13.5px;
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:.15s;
  background:#eef4ee;color:#35513d;white-space:nowrap;font-weight:500}
.btn:hover{filter:brightness(.97)}
.btn:active{transform:translateY(1px)}
.btn-primary{background:linear-gradient(180deg,#2c8f47,#22783a);color:#fff;box-shadow:0 2px 6px rgba(34,120,58,.25)}
.btn-primary:hover{background:linear-gradient(180deg,#2f9a4c,#248040)}
.btn-outline{background:#fff;border-color:#d9e5da;color:#3c5544}
.btn-outline:hover{border-color:#b9d3bc;background:#f8fcf8}
.btn-danger{background:#fff0f0;color:#c53b3b;border-color:#f4d5d5}
.btn-danger:hover{background:#ffe6e6}
.btn-warn{background:#fff7e8;color:#a96a06;border-color:#f2e0bd}
.btn-ghost{background:transparent;color:#516a58}
.btn-sm{height:29px;padding:0 10px;font-size:12.5px;border-radius:7px}
.btn-lg{height:44px;font-size:15px;width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ---------- 布局 ---------- */
.shell{display:flex;min-height:100vh}
.sidebar{width:222px;flex:0 0 222px;background:linear-gradient(175deg,#1c5f2c 0%,#217a38 60%,#1e6f33 100%);
  color:#fff;position:fixed;left:0;top:0;bottom:0;display:flex;flex-direction:column;z-index:50}
.brand{display:flex;align-items:center;gap:10px;padding:20px 18px 18px;border-bottom:1px solid rgba(255,255,255,.13)}
.brand .mark{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;font-size:19px;flex:0 0 34px}
.brand h2{font-size:15.5px;font-weight:600;line-height:1.2;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand small{font-size:10.5px;opacity:.62;letter-spacing:1.4px;display:block;margin-top:2px}
.nav{padding:12px 10px;flex:1;overflow-y:auto}
.nav a{display:flex;align-items:center;gap:10px;padding:10.5px 13px;border-radius:8px;font-size:14px;
  color:rgba(255,255,255,.82);cursor:pointer;margin-bottom:2px;transition:.15s;position:relative}
.nav a:hover{background:rgba(255,255,255,.1);color:#fff}
.nav a.active{background:rgba(255,255,255,.17);color:#fff;font-weight:600}
.nav a.active::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:3px;background:#ffd451}
/* ---------- 线性图标（统一 24 网格 / currentColor） ---------- */
.ic{display:block;flex:0 0 auto;vertical-align:middle}
.nav .ico{width:20px;height:20px;display:flex;align-items:center;justify-content:center}
.nav .ico .ic{opacity:.88;transition:opacity .15s,transform .15s}
.nav a:hover .ico .ic{opacity:1}
.nav a.active .ico .ic{opacity:1;transform:scale(1.04)}
.nav a .ico{color:#eafff0}
.brand .mark .ic{color:#fff;opacity:.95}
.login-card .logo .ic{color:#20703a}
.page-head h1 .ic{color:var(--green2);opacity:.95}
.nav .grp{font-size:11px;letter-spacing:1px;color:rgba(255,255,255,.42);padding:14px 14px 6px}
.side-foot{padding:12px 12px 16px;border-top:1px solid rgba(255,255,255,.13)}
.who{margin-bottom:10px;min-width:0}
.who .nm{font-size:13px;font-weight:600;line-height:1.3;max-width:186px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who .rl{font-size:10.5px;opacity:.66;line-height:1.35;max-width:186px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-foot button{width:100%;height:32px;border-radius:7px;border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);color:rgba(255,255,255,.88);font-size:12.5px;cursor:pointer;margin-top:6px}
.side-foot button:hover{background:rgba(255,255,255,.15)}

.main{margin-left:222px;flex:1;padding:22px 26px 40px;min-width:0}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.page-head h1{font-size:20px;font-weight:600;letter-spacing:.3px;display:flex;align-items:center;gap:8px}
.page-head p{color:var(--muted);font-size:12.5px;margin-top:5px}

/* ---------- 卡片 / 统计 ---------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:13px;margin-bottom:18px}
.stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px 17px;
  box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat::after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--green2);opacity:.85}
.stat.b::after{background:var(--blue)} .stat.o::after{background:var(--amber)}
.stat.r::after{background:var(--red)} .stat.p::after{background:var(--purple)}
.stat .k{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px}
.stat .v{font-size:26px;font-weight:700;margin-top:6px;letter-spacing:.5px;font-variant-numeric:tabular-nums}
.stat .h{font-size:11.5px;color:var(--muted2);margin-top:4px}
.stat.clickable{cursor:pointer;transition:.16s}
.stat.clickable:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(20,70,35,.1)}

/* 分组小标题（当季 / 本年） */
.sec-h{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:2px 0 10px}
.sec-h h2{font-size:13.5px;font-weight:600;color:#2c4a37;display:flex;align-items:center;gap:8px;letter-spacing:.3px}
.sec-h h2::before{content:"";width:3px;height:13px;border-radius:2px;background:var(--green2)}
.sec-h .meta{font-size:11.5px;color:var(--muted2)}
.season-chips{display:flex;flex-wrap:wrap;gap:8px;margin:-8px 0 18px}
.schip{background:#f4f9f5;border:1px solid #dbe9de;border-radius:20px;padding:4px 12px;font-size:11.5px;color:#4e6557}
.schip b{color:#2a8a45;font-variant-numeric:tabular-nums}

/* 快捷入口 */
.quick-bar{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 16px}
.qbtn{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 15px 0 12px;
  background:#fff;border:1px solid #dfeade;border-radius:11px;color:#2c4a37;font-size:13.5px;
  cursor:pointer;box-shadow:0 1px 2px rgba(20,70,35,.04);transition:.15s}
.qbtn:hover{transform:translateY(-2px);border-color:#b9d8bf;box-shadow:0 8px 20px rgba(20,70,35,.1);color:#1a5c2a}
.qbtn:active{transform:translateY(0)}
.qbtn .qi{display:inline-flex;color:#2a8a45}
.qbtn.qedit{color:var(--muted);border-style:dashed;border-color:#d9e3d9;background:#fbfdfb;padding-left:13px}
.qbtn.qedit:hover{color:#2c4a37;border-color:#b9d8bf}
.qmodal{width:520px;max-width:94vw}
.qmodal .hint{font-size:12.5px;color:var(--muted);margin:-8px 0 4px}
.qlist{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fbfdfb}
.qrow{display:flex;align-items:center;gap:9px;padding:8px 10px;font-size:13px;border-bottom:1px solid var(--line2)}
.qrow:last-child{border-bottom:0}
.qrow .qi{display:inline-flex;color:#2a8a45}
.qrow .qt{flex:1;color:#2c4a37}
.qops{display:flex;gap:5px}
.qmini{width:26px;height:26px;border-radius:7px;border:1px solid #dde7dd;background:#fff;color:#4e6557;
  font-size:12px;line-height:1;cursor:pointer;transition:.15s;display:inline-flex;align-items:center;justify-content:center}
.qmini:hover:not(:disabled){border-color:#b9d8bf;background:#f3faf4;color:#1a5c2a}
.qmini:disabled{opacity:.35;cursor:not-allowed}
.qmini.del{color:#c05757;border-color:#f0d9d9}
.qmini.del:hover{background:#fff2f2;border-color:#e8bcbc}
.qgrid{display:flex;flex-wrap:wrap;gap:8px}
.qadd{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 11px;border-radius:9px;
  border:1px dashed #d9e5da;background:#fbfdfb;color:#4e6557;font-size:12.5px;cursor:pointer;transition:.15s}
.qadd .qi{display:inline-flex;color:#2a8a45}
.qadd b{font-weight:400;color:#93a39a;margin-left:2px}
.qadd:hover:not(:disabled){border-color:#b9d8bf;background:#f3faf4;color:#1a5c2a}
.qadd:disabled{opacity:.4;cursor:not-allowed}
.qempty{font-size:12.5px;color:var(--muted2);padding:10px}
@media (max-width:640px){
  .quick-bar{gap:8px}
  .qbtn{height:38px;padding:0 12px;font-size:13px}
  /* 饲料表格列多，手机上保持列宽、横向滚动 */
  .feed-tbl table{min-width:620px}
  .feed-tbl td,.feed-tbl th{white-space:nowrap}
}

/* ---------- 工具条 ---------- */
.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:14px;background:#fff;
  border:1px solid var(--line);border-radius:10px;padding:10px 12px;box-shadow:var(--shadow)}
.toolbar .sp{flex:1}
.toolbar select,.toolbar input{height:33px;border:1px solid #dde7dd;border-radius:8px;padding:0 10px;
  font-size:13px;background:#fbfdfb;color:var(--text);font-family:inherit}
.toolbar select:focus,.toolbar input:focus{outline:none;border-color:var(--green2);background:#fff}
.toolbar input[type=date]{width:132px}
.chk{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:#4d6455;cursor:pointer;user-select:none}

/* ---------- 表格 ---------- */
.tbl-wrap{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
thead th{background:#f7faf7;color:#5b7162;font-weight:600;font-size:12.5px;text-align:left;
  padding:11px 12px;border-bottom:1px solid var(--line);position:sticky;top:0;white-space:nowrap;z-index:2}
tbody td{padding:10px 12px;border-bottom:1px solid var(--line2);vertical-align:middle}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover{background:#fafdf9}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
td.mid,th.mid{text-align:center}
.empty{padding:44px 0;text-align:center;color:var(--muted2);font-size:13px}
/* 饲料登记使用：固定行录入表格。各列固定宽度靠左，右侧空白列吸收剩余宽度 */
.fu-grid{table-layout:fixed}
.fu-grid .fu-idx{width:40px}
.fu-grid .fu-name{width:200px;white-space:nowrap}
.fu-grid .fu-unit{width:56px}
.fu-grid .fu-stock{width:90px}
.fu-grid .fu-qty{width:136px}
#fbGridWrap .fu-stock{width:86px}
#fbGridWrap .fu-qty{width:128px}
#fbGridWrap .fu-price{width:104px}
.fu-grid .fu-fill{width:auto;border-bottom:none!important;background:transparent!important}
.fu-grid td{padding:5px 8px}
.fu-grid thead th{padding:8px 8px;font-size:12px}
.fu-grid input{width:100%;height:32px;border:1px solid #dde7dd;border-radius:7px;padding:0 8px;
  font-size:14px;font-family:inherit;background:#fbfdfb;color:var(--text)}
.fu-grid input:focus{outline:none;border-color:var(--green2);background:#fff}
.fu-grid tr:focus-within td{background:#f2f9f3}
/* 进货 / 出库记录：页面内固定行录入表（桌面 + 手机同一套，手机列自适应） */
.fu-form{padding:14px 16px 12px}
.fu-form-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.fu-form-head h3{margin:0;font-size:15px;display:flex;align-items:center;gap:7px}
.fu-form-head p{margin:5px 0 0;color:#7b8a81;font-size:12.5px;line-height:1.6}
.fu-form-meta{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.fu-form-meta .field{margin:0;min-width:150px}
.fu-form-meta .fu-note{flex:1;min-width:180px}
.fu-form-meta input{height:33px;width:100%;border:1px solid #dde7dd;border-radius:8px;padding:0 10px;
  font-size:13px;background:#fbfdfb;color:var(--text);font-family:inherit}
.fu-form-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.fu-form-foot #fuCount,.fu-form-foot #fbCount{color:#7b8a81;font-size:12.5px}
.fu-btn-short{display:none}
.fu-form .fu-grid thead th{position:sticky;top:0}
.fu-stock-m{display:none}
@media (max-width:640px){
  .fu-form{padding:12px}
  .fu-form-meta .field{flex:1;min-width:calc(50% - 5px)}
  .fu-form-meta .fu-note{min-width:100%}
  .fu-form-foot{position:sticky;bottom:0;z-index:3;background:#fff;padding:8px 0 2px;
    border-top:1px solid var(--line);box-shadow:0 -5px 12px rgba(30,60,40,.05)}
  .fu-form-foot #fuCount,.fu-form-foot #fbCount{width:100%}
  /* 手机上按钮只留短词，四个按钮排一行，吸底操作条不占太多屏幕 */
  .fu-form-foot .fu-btn-long{display:none}
  .fu-form-foot .fu-btn-short{display:inline}
  .fu-form-foot > span:last-child{width:100%}
  /* 手机上不横滑：单位与库存并入原料名下方，只留「序号 / 原料 / 输入列」 */
  #fuGridWrap table,#fbGridWrap table{min-width:0}
  .fu-grid .fu-unit,.fu-grid .fu-stock,.fu-grid .fu-fill,.fu-grid .fu-opt{display:none}
  .fu-grid .fu-idx{width:28px;padding-left:6px;padding-right:2px}
  .fu-grid .fu-name{width:auto;white-space:normal}
  #fuGridWrap .fu-qty{width:104px;padding-right:6px}
  #fbGridWrap .fu-qty{width:96px}
  #fbGridWrap .fu-price{width:72px;padding-right:6px}
  .fu-stock-m{display:block;color:#9aa99f;font-size:11px;margin-top:2px}
  .fu-grid input{height:34px}
}
.ring{font-family:Consolas,monaco,monospace;font-weight:600;letter-spacing:.3px}
.link{color:var(--green2);cursor:pointer;font-weight:600}
.link:hover{text-decoration:underline}

/* ---------- 掏窝记录 · 电子表格视图（行=笼号，列=日期） ---------- */
.sheet-tbl th,.sheet-tbl td{border-right:1px solid var(--line2);white-space:nowrap}
.sheet-tbl th:last-child,.sheet-tbl td:last-child{border-right:none}
.sheet-tbl thead th{text-align:center;padding:9px 6px;font-size:12px}
.sheet-tbl thead th:first-child{text-align:left}
.sheet-tbl tbody td{padding:7px 8px}
.sheet-tbl .bcell{text-align:center;min-width:44px;cursor:pointer;transition:background .12s}
.sheet-tbl .bcell:hover{background:#e9f5ec}
.sheet-tbl .bcell .be{font-weight:600;color:var(--text)}
.sheet-tbl .bcell .bf{font-size:10.5px;color:#9aa8a0;margin-left:2px}
.sheet-tbl .bcell .bf::before{content:"("}
.sheet-tbl .bcell .bf::after{content:")"}
.sheet-tbl .bcell.blank{cursor:default;background:#fcfdfc}
.sheet-tbl .bcell.blank:hover{background:#fcfdfc}
.sheet-tbl .sum{background:#f8fbf9;font-weight:600}
.sheet-tbl .dim{color:#8b9a90;font-weight:400}
.sheet-tbl tfoot td{background:#eff6f0;font-weight:700;border-top:2px solid #cfe2d3;position:sticky;bottom:0;padding:9px 8px}
.sheet-tbl .sticky-l{position:sticky;left:0;background:#fff;z-index:1;box-shadow:1px 0 0 var(--line2)}
.sheet-tbl thead .sticky-l{z-index:3;background:#f7faf7}
.sheet-tbl tfoot .sticky-l{background:#eff6f0}
.sheet-tbl tbody tr:hover .sticky-l{background:#fafdf9}
.sheet-tbl .bsub{font-size:10.5px;font-weight:400;color:#8b9a90;margin-top:2px}
.seg{display:inline-flex;gap:6px}

/* ---------- 毛色自绘下拉（替代原生 datalist，候选不被输入值过滤截断） ---------- */
.dd-wrap{position:relative;flex:1;min-width:0}
.dd-list{display:none;position:absolute;top:100%;left:0;right:0;z-index:80;background:#fff;border:1px solid var(--line);
  border-radius:10px;box-shadow:0 14px 34px rgba(20,70,35,.18);max-height:216px;overflow-y:auto;margin-top:4px}
.dd-item{padding:9px 13px;font-size:13px;cursor:pointer;border-bottom:1px solid var(--line2)}
.dd-item:last-child{border-bottom:none}
.dd-item:hover{background:#e9f5ec}
.dd-item.cur{background:#f2f9f3;font-weight:600}
.dd-item.none{color:var(--muted2);cursor:default;background:none}

.tag{display:inline-flex;align-items:center;gap:3px;height:21px;padding:0 8px;border-radius:20px;
  font-size:11.5px;font-weight:500;background:#eef3ee;color:#5c7265;white-space:nowrap}
.tag.ok{background:#e7f6ea;color:#1f7a3a}
.tag.warn{background:#fdf1dc;color:#a56c09}
.tag.bad{background:#fdeaea;color:#bf3b3b}
.tag.info{background:#e9f1fb;color:#2b6cb0}
.tag.gray{background:#f0f2f0;color:#7b8a80}
.tag.purple{background:#f0ecfb;color:#6344c0}

/* ---------- 分页 ---------- */
.pager{display:flex;align-items:center;justify-content:center;gap:6px;padding:13px 0 3px;flex-wrap:wrap}
.pager button{min-width:32px;height:31px;border-radius:7px;border:1px solid var(--line);background:#fff;
  color:#4c6354;font-size:12.5px;cursor:pointer;padding:0 9px}
.pager button:hover:not(:disabled){border-color:var(--green2);color:var(--green)}
.pager button.on{background:var(--green);border-color:var(--green);color:#fff}
.pager button:disabled{opacity:.42;cursor:not-allowed}
.pager .info{font-size:12px;color:var(--muted2);margin:0 8px}

/* ---------- 弹窗 ---------- */
.overlay{position:fixed;inset:0;background:rgba(18,36,24,.46);backdrop-filter:blur(2px);
  display:none;align-items:center;justify-content:center;z-index:200;padding:20px}
.overlay.show{display:flex}
.modal{background:#fff;border-radius:15px;width:540px;max-width:100%;max-height:88vh;overflow-y:auto;
  padding:22px 24px;box-shadow:0 24px 70px rgba(10,40,20,.3);animation:pop .16s ease-out}
.modal.wide{width:760px} .modal.xwide{width:920px}
@keyframes pop{from{transform:scale(.97);opacity:.6}to{transform:scale(1);opacity:1}}
.modal h3{font-size:16.5px;margin-bottom:16px;display:flex;align-items:center;gap:7px}
.modal h4{font-size:13.5px;color:var(--green);margin:16px 0 9px;padding-bottom:6px;border-bottom:1px dashed var(--line)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px;padding-top:15px;border-top:1px solid var(--line2)}
.hint{font-size:11.5px;color:var(--muted2);margin-top:4px;line-height:1.6}
.alert{background:#fff8ec;border:1px solid #f3e2c4;color:#8a5a08;border-radius:9px;padding:10px 12px;
  font-size:12.5px;line-height:1.75;margin-bottom:14px}
.alert.bad{background:#fdf0f0;border-color:#f3d5d5;color:#b13737}
.alert.ok{background:#eef9f0;border-color:#cfe9d5;color:#1d7038}
.kv{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;font-size:13px;margin-bottom:6px}
.kv .k{color:var(--muted);white-space:nowrap}
.kv .v{font-weight:500}

/* ---------- toast ---------- */
.toast-box{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:600;display:flex;
  flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{background:#20402c;color:#fff;padding:10px 18px;border-radius:9px;font-size:13px;
  box-shadow:0 10px 30px rgba(10,40,20,.28);animation:drop .2s ease-out;max-width:80vw}
.toast.ok{background:#1f7a3a} .toast.err{background:#b93a3a}
@keyframes drop{from{transform:translateY(-10px);opacity:0}to{transform:translateY(0);opacity:1}}

/* ---------- 缩略图 ---------- */
.thumb{width:46px;height:46px;object-fit:cover;border-radius:8px;border:1px solid var(--line);
  cursor:zoom-in;background:#f4f7f4;display:block}
.thumb:hover{box-shadow:0 2px 10px rgba(20,60,35,.18)}

/* ---------- 种类卡片 ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(238px,1fr));gap:14px}
.sp-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:17px;
  box-shadow:var(--shadow);cursor:pointer;transition:.16s;position:relative}
.sp-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(20,70,35,.1);border-color:#c9e0cd}
.sp-card .t{font-size:15.5px;font-weight:600;display:flex;align-items:center;gap:7px}
.sp-card .sci{font-size:11.5px;color:var(--muted2);font-style:italic;margin:5px 0 11px}
.sp-card .row{display:flex;justify-content:space-between;font-size:12.5px;color:var(--muted);margin-top:5px}
.sp-card .big{font-size:22px;font-weight:700;color:var(--green)}
.sp-card .desc{font-size:12px;color:var(--muted2);line-height:1.6;margin-top:10px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sp-card .del{position:absolute;right:10px;top:10px;opacity:0;transition:.15s}
.sp-card:hover .del{opacity:1}

/* ---------- 图表 ---------- */
.chart-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px 16px 8px;box-shadow:var(--shadow);margin-bottom:16px}
.chart-box h4{margin:0 0 10px;font-size:13.5px;color:#3a5443;font-weight:600;display:flex;justify-content:space-between}
.bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px;font-size:12.5px}
.bar-row .lb{width:110px;color:#4e6557;text-align:right;flex:0 0 110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{flex:1;height:16px;background:#f2f6f2;border-radius:5px;overflow:hidden}
.bar-fill{height:100%;border-radius:5px;background:linear-gradient(90deg,#4aa862,#2a8a45);transition:width .4s}
.bar-val{width:74px;font-variant-numeric:tabular-nums;color:#4e6557;font-size:12px}

.color-tags{display:flex;flex-wrap:wrap;gap:4px}
.ctag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:11.5px;color:#fff}
.ctag.light{color:#3a4a40}

.note{background:#f7faf7;border:1px solid var(--line);border-radius:9px;padding:11px 13px;font-size:12.5px;
  color:#5b7162;line-height:1.75;margin-bottom:14px}

/* ---------- 手机端顶栏与抽屉 ---------- */
.m-top{display:none}
.m-scrim{display:none}

@media(max-width:768px){
  /* 顶栏 */
  .m-top{display:flex;align-items:center;gap:10px;position:fixed;top:0;left:0;right:0;height:52px;z-index:120;
    background:linear-gradient(180deg,#1c5f2c,#217a38);color:#fff;padding:0 12px;box-shadow:0 2px 10px rgba(10,40,20,.25)}
  .m-top #mMenu{width:40px;height:40px;border:none;background:rgba(255,255,255,.14);border-radius:9px;
    color:#fff;font-size:19px;cursor:pointer;flex:0 0 40px}
  .m-top .m-tt{flex:1;font-size:15px;font-weight:600;letter-spacing:.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .m-top .m-av{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;
    justify-content:center;font-size:13px;font-weight:600;flex:0 0 32px}

  /* 侧栏改为抽屉 */
  .shell{display:block;min-height:100vh}
  .sidebar{width:252px;flex:none;left:0;top:52px;bottom:0;transform:translateX(-105%);transition:transform .22s ease;
    box-shadow:14px 0 40px rgba(10,40,20,.3);border-radius:0 14px 14px 0;top:52px;z-index:115}
  .sidebar.open{transform:translateX(0)}
  .m-scrim{display:block;position:fixed;inset:0;top:52px;background:rgba(15,30,20,.45);z-index:110;opacity:0;
    pointer-events:none;transition:opacity .2s}
  .m-scrim.show{opacity:1;pointer-events:auto}

  .main{margin-left:0;padding:64px 12px 90px}
  .page-head h1{font-size:17.5px}
  .page-head p{font-size:12px}

  /* 统计卡两列 */
  .stats{grid-template-columns:1fr 1fr;gap:9px}
  .stat{padding:12px 13px}
  .stat .v{font-size:21px}

  /* 工具条与表格 */
  .toolbar{padding:9px 10px;gap:7px}
  .toolbar input[type=date]{width:124px}
  .tbl-wrap{border-radius:10px}
  table{font-size:12.5px}
  thead th{padding:9px 9px;font-size:11.5px}
  tbody td{padding:9px 9px}
  .thumb{width:42px;height:42px}
  .pager{padding-bottom:10px}

  /* 弹窗改为近全屏底部抽屉 */
  .overlay{padding:0;align-items:flex-end}
  .modal{width:100%;max-width:100%;max-height:94vh;border-radius:18px 18px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
  .modal.wide,.modal.xwide{width:100%}
  .modal-actions{position:sticky;bottom:0;background:#fff;margin:14px -16px 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top:1px solid var(--line);gap:10px}
  .modal-actions .btn{flex:1;height:42px;font-size:14.5px}
  .form-row,.form-row-3{grid-template-columns:1fr}
  .field input,.field select,.field textarea{height:44px;font-size:16px}
  #wbText{min-height:120px;font-size:14px}
  .wb-day{height:30px;padding:0 10px}
  .wb-prev{font-size:12.5px}
  .field label{font-size:13.5px}
  .btn{min-height:40px}
  .btn-sm{min-height:34px}

  /* 批发明细行两列 */
  .ws-row{grid-template-columns:1fr 1fr !important}
  .ws-row .wrBreed{grid-column:span 1}

  /* 登录页 */
  .login-wrap{padding:16px}
  .login-card{width:100%;max-width:390px;padding:26px 22px 22px}
  .login-help{min-height:44px;font-size:13px}

  /* 种类卡片 */
  .grid{grid-template-columns:1fr 1fr;gap:9px}
  .sp-card{padding:13px}
  .sp-card .del{opacity:1}

  .note,.alert{font-size:12px}
}

@media(max-width:380px){
  .grid{grid-template-columns:1fr}
}

/* ---------------- 全局搜索（仪表盘） ---------------- */
.gsearch { position: relative; margin: 4px 0 14px; }
.gs-wrap { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid #3f8f5f; border-radius: 12px; padding: 11px 16px; box-shadow: 0 2px 12px rgba(63,143,95,.10); }
.gs-wrap:focus-within { box-shadow: 0 3px 16px rgba(63,143,95,.22); }
.gs-wrap input { flex: 1; border: none; outline: none; font-size: 15.5px; background: transparent; color: #243b30; }
.gs-wrap input::placeholder { color: #9aa8a0; }
.gs-dd { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid #e0e8e2; border-radius: 10px; box-shadow: 0 12px 30px rgba(30,60,40,.16); z-index: 80; max-height: 430px; overflow: auto; }
.gs-grp { padding: 8px 14px 3px; font-size: 12px; color: #8b9a90; font-weight: 700; letter-spacing: .5px; }
.gs-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 14px; cursor: pointer; font-size: 13.5px; color: #2c3e33; line-height: 1.5; }
.gs-item:hover { background: #f2f8f3; }
.gs-item .sub { color: #8b9a90; font-size: 12px; }
.gs-item b { color: #1f5c38; }
.gs-tag { flex: none; font-size: 11px; padding: 1px 9px; border-radius: 999px; background: #eaf3ee; color: #2f7d4f; margin-top: 1px; }
.gs-item .gs-txt { flex: 1; min-width: 0; }
.gs-tail { flex: none; display: flex; align-items: center; gap: 6px; }
.gs-edit { flex: none; border: 1px solid #cfe0d5; background: #fff; color: #2f7d4f; font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 7px; cursor: pointer; font-family: inherit; }
.gs-edit:hover { background: #eaf3ee; border-color: #a9cdb7; }
.gs-edit:active { background: #dfeee5; }
.gs-empty { padding: 18px; color: #8b9a90; text-align: center; font-size: 13px; }

/* ---------------- 今日工作（仪表盘每日工作内容） ---------------- */
.dt-item { display: inline-flex; align-items: center; gap: 7px; background: #f6faf7; border: 1px solid #dfe9e2; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: #2c3e33; }
.dt-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2f7d4f; cursor: pointer; }
.dt-item.dt-done { background: #eef5e4; border-color: #cfe3c2; }
.dt-item.dt-done .dt-txt { text-decoration: line-through; color: #8b9a90; }
.dt-del { border: none; background: transparent; color: #b93a3a; cursor: pointer; font-size: 12px; padding: 0 2px; line-height: 1; }
.dt-del:hover { color: #8f2020; }

/* ==================== 饮食计划 ==================== */
.diet-today{display:flex;align-items:center;justify-content:space-between;gap:14px;
  background:linear-gradient(135deg,#f2faf3,#e8f5ea);border:1px solid #dbeadb;border-radius:14px;
  padding:16px 18px;margin-bottom:14px}
.diet-today.is-done{background:linear-gradient(135deg,#f5faee,#eef6e2);border-color:#d8e7c6}
.diet-today.slim{padding:12px 14px;margin:0;border-radius:0;border:none;background:transparent}
.dt-k{font-size:12.5px;color:var(--muted);margin-bottom:8px;letter-spacing:.3px}
.dt-v{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.dtag{display:inline-flex;align-items:center;background:#fff;border:1px solid #cfe3d2;color:#1a5c2a;
  border-radius:999px;padding:5px 14px;font-size:15px;font-weight:700;letter-spacing:.3px}
.diet-today.is-done .dtag{border-color:#c9dfb2;color:#4a7a2a}
.dtag.rest{background:#f4f6f4;border-color:#dde4dd;color:#8b9a90}
.dt-none{color:var(--muted2);font-size:13px}
.dt-note{font-size:12.5px;color:var(--muted)}
.dt-r{display:flex;align-items:center;gap:12px;flex-shrink:0}
.dt-btn{min-width:104px;height:40px;font-size:14px}

.diet-bar{display:flex;align-items:center;gap:10px;margin:2px 0 12px;flex-wrap:wrap}
.diet-bar b{font-size:15px}
.dbtn{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:#fff;color:#4a5c50;
  font-size:16px;line-height:1;cursor:pointer}
.dbtn:hover{border-color:var(--green2);color:var(--green2)}
.diet-prog{margin-left:auto;font-size:12.5px;color:var(--muted)}
.diet-prog b{color:var(--green);font-size:14px}

.diet-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.dg-h{text-align:center;font-size:12px;color:var(--muted);padding:2px 0 4px;font-weight:600}
.dc{min-height:76px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px 8px;
  cursor:pointer;transition:.15s;position:relative;overflow:hidden}
.dc:hover{border-color:#b9d8bf;box-shadow:0 2px 10px rgba(20,70,35,.08);transform:translateY(-1px)}
.dc.blank{background:transparent;border:none;cursor:default;box-shadow:none;transform:none}
.dc.today{border-color:var(--green2);box-shadow:0 0 0 2px rgba(42,138,69,.12)}
.dc.done{background:#f5faf1;border-color:#d8e8c8}
.dc-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.dc-d{font-size:14px;font-weight:700;color:#3d5546}
.dc.today .dc-d{color:var(--green)}
.dc-ok{color:#3f8f3f;font-weight:700;font-size:12px}
.dc-n{font-size:13.5px;font-weight:600;color:#1f3d2a;line-height:1.25;word-break:break-all}
.dc.done .dc-n{color:#5d7a4d}
.dc-a{font-size:12px;color:#7d8f84;line-height:1.3;margin-top:2px;word-break:break-all}
.dc-note{font-size:10.5px;color:#b07a2a;margin-top:3px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dc-empty{color:#c5d2c8}

.diet-cats{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.dcat{background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 12px;font-size:12.5px;color:var(--muted)}
.dcat i{font-style:normal;color:#3d5546;font-weight:600;margin-right:6px}
.dcat b{color:var(--green);font-size:13px;margin:0 3px 0 1px}

.diet-fill-list{display:flex;flex-direction:column;gap:10px;margin:14px 0}
.diet-fill-list .btn{height:auto;flex-direction:column;align-items:flex-start;gap:3px;padding:12px 14px;text-align:left}
.diet-fill-list .btn b{font-size:14px}
.diet-fill-list .btn span{font-size:12px;color:var(--muted);font-weight:400}

@media (max-width:640px){
  .diet-grid{gap:5px}
  .dc{min-height:64px;padding:4px 5px;border-radius:8px}
  .dc-d{font-size:11.5px}
  .dc-n{font-size:10.5px;line-height:1.15}
  .dc-a{font-size:9.5px}
  .dg-h{font-size:11px}
  .diet-today{flex-direction:column;align-items:stretch;gap:12px;padding:14px}
  .dt-r{justify-content:space-between}
  .dtag{font-size:14px;padding:4px 12px}
  .dc-note{display:none}
  .diet-prog{width:100%;margin-left:0;text-align:right}
}

/* 饮食计划：视图切换 + 列表 */
.diet-view{margin-left:8px;display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.diet-view button{border:none;background:#fff;color:var(--muted);font-size:12px;padding:0 11px;height:27px;cursor:pointer}
.diet-view button.on{background:var(--green-soft);color:var(--green);font-weight:600}
.dc-a.dis{color:#b07a2a}
.dc-a.rest{color:#aab6ad}

.dlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:6px}
.dl-row{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);
  border-radius:10px;padding:7px 11px;cursor:pointer;transition:.15s}
.dl-row:hover{border-color:#b9d8bf;box-shadow:0 2px 10px rgba(20,70,35,.06)}
.dl-row.today{border-color:var(--green2);box-shadow:0 0 0 2px rgba(42,138,69,.1)}
.dl-row.done{background:#f7fbf3;border-color:#dcebcc}
.dl-d{width:46px;flex-shrink:0;text-align:center;font-size:15px;font-weight:700;color:#3d5546;line-height:1.1}
.dl-d small{display:block;font-size:10.5px;color:var(--muted2);font-weight:400;margin-top:2px}
.dl-mid{flex:1;min-width:0}
.dl-n{font-size:14px;font-weight:600;color:#1f3d2a}
.dl-row.done .dl-n{color:#5d7a4d}
.dl-a{font-size:11.5px;color:#7d8f84;margin-top:1px}
.dl-a.dis{color:#b07a2a}
.dl-a.rest{color:#aab6ad}
.dl-a i{font-style:normal;color:#b07a2a;margin-left:5px}
.dl-ck{width:28px;height:28px;border-radius:50%;border:1.5px solid #cfdcd2;background:#fff;color:#fff;
  font-size:14px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0}
.dl-ck.on{background:var(--green2);border-color:var(--green2)}
@media (max-width:640px){
  .dlist{grid-template-columns:1fr}
  .dl-d{width:44px;font-size:15px}
  .dl-row{padding:9px 11px;gap:10px}
  .dl-n{font-size:15px}
  .dl-a{font-size:12.5px}
  .dl-ck{width:32px;height:32px}
}

/* ==================== 今日工作卡片（含今日/明日饮食） ==================== */
.today-card{padding:0;overflow:hidden}
.today-card .tk{font-size:12px;color:#7d8f84;font-weight:600;letter-spacing:.5px;flex-shrink:0}
.today-card .tacts{margin-left:auto;display:flex;align-items:center;gap:12px;flex-shrink:0}
.today-card .tacts .btn{min-width:96px}

/* 饲料补货提醒：库存到下限时出现在今日工作第一行 */
.tlow{display:flex;align-items:center;gap:12px;padding:10px 14px;
  background:linear-gradient(135deg,#fff9ec,#fdf1d9);border-bottom:1px solid #f0dfc2;flex-wrap:wrap}
.tlow .tk{color:#a56c09}
.tlow .dt-v{flex:1;min-width:0;font-size:13px;color:#77591f;line-height:1.6}
.tlow .dt-v b{color:#a56c09;font-size:14px}
.tlow .link{color:#9a6006}
.tlow .dt-note{color:#a08a5f}

.tdine{display:flex;align-items:center;gap:12px;padding:11px 14px;
  background:linear-gradient(135deg,#f3faf4,#eaf6ec);border-bottom:1px solid #dfebdf;flex-wrap:wrap}
.tdine.is-done{background:linear-gradient(135deg,#f7fbef,#eef7e3);border-bottom-color:#dfeacc}
.ttasks{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:11px 14px}

.tmln{display:flex;align-items:center;gap:10px;padding:9px 14px;background:#fbfcfb;
  border-top:1px dashed #e3ebe4;flex-wrap:wrap}
.tk-tm{color:#9aa8a0}
.tm-date{font-size:12.5px;color:#8b9a90;font-variant-numeric:tabular-nums}
.tmln .dtag{background:#fff;border-color:#e2e9e3;color:#4a5c50;font-size:13px;padding:3px 11px}

@media (max-width:640px){
  .tdine{gap:8px;padding:10px 11px}
  .tdine .tacts{width:100%;margin-left:0;justify-content:space-between}
  .tlow{gap:7px;padding:10px 11px}
  .tlow .dt-v{order:3;width:100%;flex:none;font-size:12.5px}
  .tlow .tacts{order:4;width:100%;margin-left:0;justify-content:flex-end}
  .ttasks{padding:10px 11px;gap:7px}
  .ttasks #dtNew{width:100%!important}
  .tmln{padding:9px 11px;gap:7px}
  .tmln .tm-date{order:2}
  .tmln .dt-v{order:3;width:100%}
  .tmln .link{margin-left:auto!important;order:4}
}

/* ==================== 工作计划（按月排班） ==================== */
.wk-sel{height:30px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#3d5546;
  font-size:12.5px;padding:0 8px;max-width:150px}

.wk-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.wk-c{min-height:58px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px 7px;
  cursor:pointer;transition:.15s;overflow:hidden;display:flex;flex-direction:column;gap:3px}
.wk-c:hover{border-color:#b9d8bf;box-shadow:0 2px 10px rgba(20,70,35,.08);transform:translateY(-1px)}
.wk-c.blank{background:transparent;border:none;cursor:default;box-shadow:none;transform:none;min-height:0}
.wk-c.has{min-height:96px}
.wk-c.today{border-color:var(--green2);box-shadow:0 0 0 2px rgba(42,138,69,.12);background:#fafdf9}
.wk-c.done{background:#f7fbf3;border-color:#dcebcc}
.wk-c-h{display:flex;align-items:center;justify-content:space-between;font-size:13.5px;font-weight:700;color:#3d5546;line-height:1.15}
.wk-c-h i{font-style:normal;font-size:10.5px;font-weight:600;color:#8ba394}
.wk-c.today .wk-c-h{color:var(--green)}
.wk-c.done .wk-c-h i{color:#5f8f42}

.wk-i{font-size:11px;line-height:1.3;color:#2b4636;background:#f2f8f3;border-radius:5px;
  padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk-i b{color:#2f7d4f;font-weight:600;margin-right:4px}
.wk-i.ok{background:#f7faf3;color:#93a596;text-decoration:line-through}
.wk-i.ok b{color:#a7b8a2;text-decoration:none}
.wk-more{font-size:10.5px;color:#8ba394;padding-left:2px}

.wk-lrow{align-items:flex-start}
.wk-line{display:flex;flex-wrap:wrap;gap:6px}
.wk-chip{font-size:12.5px;background:#f2f8f3;border:1px solid #e2ede4;border-radius:999px;padding:3px 10px;color:#2b4636}
.wk-chip b{color:#2f7d4f;font-weight:600;margin-right:4px}
.wk-chip.ok{background:#f7faf3;border-color:#e5ecdf;color:#96a798;text-decoration:line-through}
.wk-chip.ok b{text-decoration:none;color:#a7b8a2}

/* 日弹窗 / 员工名单里的任务行 */
.wk-list{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.wk-emp-list{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.wk-row{display:flex;align-items:center;gap:9px;background:#f8fbf9;border:1px solid #e4ece6;
  border-radius:9px;padding:7px 10px;font-size:13.5px}
.wk-row.ok{background:#f6faf1;border-color:#dde9d0}
.wk-row.off{opacity:.55}
.wk-row input[type="checkbox"]{width:16px;height:16px;accent-color:#2f7d4f;cursor:pointer;flex-shrink:0}
.wk-emp{flex-shrink:0;font-size:11.5px;background:#e8f2ea;color:#2f7d4f;border-radius:999px;padding:2px 8px;font-weight:600}
.wk-emp.none{background:#f1f3f2;color:#96a49c}
.wk-bdg{font-style:normal;font-size:10px;font-weight:600;color:#b13737;background:#fdeeee;border:1px solid #f5d9d9;border-radius:4px;padding:0 3px;margin-left:4px;white-space:nowrap;vertical-align:1px}
.wk-txt{flex:1;min-width:0;word-break:break-all}
.wk-row.ok .wk-txt{text-decoration:line-through;color:#94a596}
.wk-note{font-size:11.5px;color:#b07a2a;flex-shrink:0}
.wk-ico{border:none;background:transparent;color:#7d8f84;cursor:pointer;font-size:13px;padding:0 2px;line-height:1}
.wk-ico:hover{color:var(--green2)}
.wk-ico.del{color:#b93a3a;font-size:12px}
.wk-ico.del:hover{color:#8f2020}
.wk-empty{color:#9aa8a0;font-size:13px;padding:14px 4px;text-align:center;background:#fafcfb;border-radius:9px}

.wk-name{flex-shrink:0;min-width:56px;color:#2b4636}
.wk-job{font-size:12px;color:#7d8f84;flex-shrink:0;min-width:52px}
.wk-tel{font-size:12px;color:#9aa8a0;flex:1;min-width:0}

.wk-add{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding-top:12px;border-top:1px dashed var(--line)}
.wk-add input{flex:1;min-width:120px}
.wk-add select{height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;
  font-size:13.5px;padding:0 8px;color:#2b4636;max-width:170px}
.wk-copy{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:12.5px;color:#7d8f84}
.wk-copy input[type="date"]{height:32px;border:1px solid var(--line);border-radius:8px;padding:0 8px;font-size:13px;color:#2b4636}

/* 批量排活 */
.wk-batch-link{margin-top:8px;font-size:12.5px}
.wk-txt.can-edit{cursor:text;border-radius:5px;padding:0 3px;margin:0 -3px}
.wk-txt.can-edit:hover{background:#eef6ef}
.wb-days{display:flex;gap:6px;flex-wrap:wrap;margin:-2px 0 12px}
.wb-day{height:32px;padding:0 12px;border:1px solid #cfdcd2;background:#fff;border-radius:999px;
  font-size:12.5px;color:#4e6357;cursor:pointer}
.wb-day:hover{border-color:#a9c6b2;color:#2f7d4f}
.wb-day.on{background:#eaf5ec;border-color:#8fc39d;color:#1d7038;font-weight:600}
.wb-prev{background:#f6f9f6;border:1px solid #e2ebe3;border-radius:9px;padding:9px 12px;
  font-size:13px;color:#3d5546;margin-bottom:14px}
.wb-prev b{color:#1d7038}
.wb-prev.bad{background:#fdf3f3;border-color:#f3d5d5;color:#b13737}
#wbText{height:auto;min-height:150px;font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;font-size:13px}

/* 首页今日工作卡片：今日派工 */
.twork{display:flex;align-items:center;gap:10px;padding:9px 14px;background:#fbfcfb;
  border-top:1px dashed #e3ebe4;flex-wrap:wrap}
.wp-chip{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e2e9e3;
  border-radius:999px;padding:4px 11px;font-size:13px;color:#3d5546}
.wp-chip b{color:#2f7d4f;font-weight:600}
.wp-chip.ok{background:#f6faf1;border-color:#dde9d0;color:#93a396;text-decoration:line-through}
.wp-chip.ok b{text-decoration:none;color:#a3b39e}
.wp-chip input[type="checkbox"]{width:15px;height:15px;accent-color:#2f7d4f;cursor:pointer;margin:0}

@media (max-width:640px){
  .wk-grid{gap:5px}
  /* 手机 7 列太窄，格子里只留日期 + 完成数 + 一个绿点，点开看详情 */
  .wk-c,.wk-c.has{min-height:46px;padding:4px 5px;border-radius:8px;gap:2px}
  .wk-i,.wk-more{display:none}
  .wk-c.has::after{content:'';display:block;width:5px;height:5px;border-radius:50%;
    background:var(--green2);margin:auto auto 1px}
  .wk-c.has.done::after{background:#9dbb83}
  .diet-prog{width:100%;text-align:right;margin-left:0}
  .wk-c-h{font-size:11.5px}
  .wk-c-h i{font-size:9.5px}
  .wk-i{font-size:9.5px;padding:1px 4px}
  .wk-i b{display:none}
  .wk-more{font-size:9px}
  .wk-sel{max-width:110px}
  .wk-add select{max-width:none;width:100%}
  .wk-add .btn{width:100%}
  .twork{gap:7px;padding:9px 11px}
  .twork .tacts{width:100%;margin-left:0}
  .wp-chip{font-size:12.5px;padding:3px 9px}
}

/* 未指派的派工用灰色，弱化 */
.wp-chip b.none{color:#a9b5ad}
.wk-i b.none{color:#9fb0a4}
.wk-chip b.none{color:#9fb0a4}

/* 工作计划列表：一天一行，跨满整行 */
.wk-dlist{display:flex;flex-direction:column;gap:6px}
.wk-dlist .dl-row{padding:9px 12px}
.wk-dlist .dl-d{width:52px}

/* ==================== 员工与账号（人员主表） ==================== */
.people-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:-2px 0 12px;
  font-size:13px;color:#5b7162}
.people-bar b{color:var(--green);font-size:14.5px;margin:0 2px}

.emp-acc{flex-shrink:0;font-size:11.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  background:#eef5ef;color:#2f7d4f;border-radius:6px;padding:2px 7px;min-width:74px;max-width:140px;
  text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.emp-acc.none{font-family:inherit;background:#f2f4f2;color:#a3aea6}
.wk-acts{display:flex;gap:5px;flex-shrink:0;margin-left:auto;min-width:206px;justify-content:flex-end}
.wk-acts .btn{height:26px;padding:0 9px;font-size:12px;line-height:1}

@media (max-width:640px){
  .wk-row{flex-wrap:wrap;gap:6px}
  .wk-tel{flex:1 0 auto}
  .wk-acts{width:100%;min-width:0;margin-left:0;justify-content:flex-end}
  .people-bar{margin-bottom:10px;gap:6px}
  .people-bar span{width:100%}
}

/* 员工与账号：手机端横向滚动而不是把列挤扁 */
@media (max-width:640px){
  .people-tbl{min-width:620px}
  .people-tbl th,.people-tbl td{white-space:nowrap}
  .people-tbl .btn-sm{padding:0 7px;font-size:11.5px}
}

/* 员工与账号：手机用卡片，桌面用表格 */
.people-cards{display:none;flex-direction:column;gap:8px}
.pcard{background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 12px;
  box-shadow:0 1px 3px rgba(20,60,35,.04)}
.pcard.off{opacity:.62;background:#fafbfa}
.pc-top{display:flex;align-items:center;gap:6px;font-size:15px}
.pc-top b{font-weight:700;color:#1f3d2a;font-size:15.5px}
.pc-meta{font-size:12.5px;color:#7d8f84;margin-top:4px}
.pc-acc{margin-top:6px;font-size:12.5px;color:#5b7162}
.pc-acc b{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#2f7d4f}
.pc-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.pc-acts .btn{height:32px;padding:0 12px;font-size:12.5px}
@media (max-width:640px){
  .people-cards{display:flex}
  .people-wrap{display:none}
}

/* 模块未开通：只在直接访问被关闭的页面时出现，做成一页轻提示，不用整版警告 */
.locked-card{max-width:430px;margin:9vh auto 0;padding:34px 26px 30px;text-align:center;
  background:#fff;border:1px solid var(--line);border-radius:16px}
.lc-ico{width:52px;height:52px;border-radius:15px;background:#f2f6f3;color:#8ba295;
  display:flex;align-items:center;justify-content:center;margin:0 auto 14px}
.lc-t{font-size:15.5px;font-weight:600;color:#2b4636;letter-spacing:.3px}
.lc-d{margin-top:7px;font-size:12.6px;line-height:1.95;color:#8a9a90}
@media (max-width:640px){
  .locked-card{margin:14vh 16px 0;padding:30px 20px 26px}
}

/* 未开通功能的推荐条：让客户知道还有什么能做，可以关掉（关掉后侧边栏「系统功能」仍可查看） */
.promo-bar{display:flex;align-items:center;gap:9px;margin-bottom:14px;padding:9px 10px 9px 13px;
  background:#f4f9f5;border:1px solid #e3efe6;border-radius:12px;font-size:13px;color:#4a6354}
.pb-star{color:#5e9f78;font-size:13px;line-height:1;flex:none}
.pb-t{flex:1;min-width:0}
.pb-t b{color:#2f7d4f}
.pb-go{color:#2f7d4f;cursor:pointer;white-space:nowrap;font-size:12.5px;flex:none}
.pb-go:hover{text-decoration:underline}
.pb-x{width:25px;height:25px;border:0;background:transparent;color:#a3b3a9;cursor:pointer;
  border-radius:7px;font-size:12px;line-height:1;flex:none;padding:0}
.pb-x:hover{background:#e7f0ea;color:#527a62}

/* 功能清单弹窗 */
.fi-list{margin:4px 0 10px}
.fi-row{display:flex;align-items:flex-start;gap:11px;padding:11px 12px;border:1px solid var(--line);
  border-radius:11px;margin-bottom:8px;background:#fff}
.fi-row.on{border-color:#e4efe8;background:#fbfdfb}
.fi-ico{width:32px;height:32px;border-radius:9px;background:#f2f6f3;color:#8ba295;
  display:flex;align-items:center;justify-content:center;flex:none}
.fi-row.on .fi-ico{background:#e8f3ec;color:#3f8259}
.fi-main{flex:1;min-width:0;display:block}
.fi-main b{display:block;font-size:13.4px;color:#24402f;font-weight:600}
.fi-main i{display:block;font-style:normal;font-size:12.2px;color:#7d8f84;line-height:1.7;margin-top:2px}
.fi-row .tag{flex:none;margin-top:2px}
.tag.rel{background:#fff;color:#43845c;box-shadow:inset 0 0 0 1px #d9e9df}
@media (max-width:640px){
  .promo-bar{flex-wrap:wrap;align-items:flex-start;gap:5px 8px;font-size:12.6px;padding:10px 10px 10px 12px}
  .pb-star{display:none}
  .pb-t{flex:1 1 100%;line-height:1.65}
  .pb-x{margin-left:auto}
}

/* 全局搜索结果：直接改 */
@media (max-width:640px){
  .gs-item{padding:10px 12px;gap:8px}
  .gs-item .gs-txt{font-size:13px}
  .gs-tail{gap:5px}
  .gs-tag{font-size:10.5px;padding:1px 7px}
  .gs-edit{padding:7px 10px;font-size:12.5px;border-radius:8px}
}
