/* 周期事务清单（台账后台，综合岗五个视图；web/routine_tasks.js）。基础样式沿用「租户情报」（tenant_intel.css）同一套：字阶 13/16/20/24、间距 4 的倍数、圆角 8/12/16、
   只有浮层（提示条）带影、一个强调色（品牌蓝）、尊重「减少动画」。图标：Lucide（ISC，© Lucide Icons and Contributors），线宽 1.5。所有规则以 .rt 开头，不影响别的页。 */
.rt{--surface:#fff;--line:#e4e7ec;--ink:#101828;--ink2:#475467;--blue:#0265c2;--blue-soft:#e8f1fb;--ok:#067647;--ok-bg:#ecfdf3;--bad:#b42318;--bad-bg:#fef3f2;--warn:#b54708;--warn-bg:#fffaeb;
  --ease:cubic-bezier(.2,0,0,1);max-width:960px;margin:0 auto;padding:24px;font-size:16px;line-height:24px;color:var(--ink)}
.rt *{box-sizing:border-box}
.rt button,.rt a.rt-btn{font:inherit;color:inherit}
.rt :focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.rt-ico{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* 结论带：一句话 + ≤2 个关键数 + 一个主动作 */
.rt-head{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start;justify-content:space-between;margin-bottom:8px}
.rt-head h1{margin:0;font-size:24px;line-height:32px;font-weight:600}
.rt-sentence{margin:4px 0 0;color:var(--ink2)}
.rt-sentence b{color:var(--ink);font-weight:600}
.rt-keys{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.rt-key{min-width:96px;padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.rt-key .k{display:block;font-size:13px;line-height:20px;color:var(--ink2)}
.rt-key .v{display:block;font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums}
.rt-key.late .v{color:var(--bad)}
.rt-tip{margin:0 0 16px;font-size:13px;line-height:20px;color:var(--ink2)}
.rt-tip b{color:var(--ink);font-weight:600}

.rt-list{display:flex;flex-direction:column;gap:8px}
.rt-row{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;transition:border-color .2s var(--ease)}
.rt-row:hover{border-color:#c9d1dc}
.rt-row.late{border-left:4px solid var(--bad)}
.rt-line{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px}
.rt-main{min-width:0}
.rt-main .t{display:block;font-weight:600}
.rt-main .s{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin-top:4px}
.rt-main .m{margin-top:4px;font-size:13px;line-height:20px;color:var(--ink2);overflow-wrap:anywhere}
.rt-main .c{margin-top:4px;font-size:13px;line-height:20px;color:var(--ink2);overflow-wrap:anywhere}
.rt-acts{display:flex;flex-wrap:wrap;gap:8px;flex:none;justify-content:flex-end}

/* 状态胶囊：只用绿/琥珀/红，小面积 */
.rt-pill{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:999px;font-size:13px;line-height:20px;font-weight:600;background:#f2f2f2;color:var(--ink2);white-space:nowrap}
.rt-pill.doing{background:var(--blue-soft);color:var(--blue)}
.rt-pill.done{background:var(--ok-bg);color:var(--ok)}
.rt-pill.late{background:var(--bad-bg);color:var(--bad)}

/* 操作空间：点「详情」「修改」后在这一行下面就地展开，不弹窗 */
.rt-space{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s var(--ease)}
.rt-space.on{grid-template-rows:1fr}
.rt-space>.rt-form{min-height:0;overflow:hidden;margin:0 16px;padding:0;border-top:1px solid transparent}
.rt-space.on>.rt-form{padding:16px 0;border-top-color:var(--line)}
.rt-form{display:block}
.rt-adhoc{margin:0 0 16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.rt-form label{display:block;margin:12px 0 8px;font-size:13px;line-height:20px;font-weight:600;color:var(--ink2)}
.rt-form label:first-child{margin-top:0}
.rt-form input[type="text"],.rt-form input[type="number"],.rt-form input[type="date"],.rt-form textarea,.rt-form select{width:100%;max-width:none;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font:inherit;color:var(--ink)}
.rt-form select{height:40px;padding:0 12px}
.rt-form textarea{min-height:64px;resize:vertical}
.rt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.rt-grid>div{min-width:0}
.rt-checks label{display:flex;gap:8px;align-items:center;min-height:32px;margin:8px 0 0;font-weight:400;color:var(--ink)}
.rt-checks input{width:auto}
.rt-err{margin:8px 0 0;font-size:13px;line-height:20px;color:var(--bad)}
.rt-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.rt-steps{margin:0 0 8px;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.rt-steps li{display:flex;gap:12px;align-items:center;min-height:40px}
.rt-steps .no{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;background:#eef1f5;font-size:13px;line-height:20px;font-weight:600;color:var(--ink2)}
.rt-steps li.done .no{background:var(--ok-bg);color:var(--ok)}
.rt-steps .lb{flex:1;min-width:0}

.rt-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:40px;padding:0 16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:none;
  transition:background-color .15s var(--ease),border-color .15s var(--ease)}
.rt-btn:hover{background:#f4f6f9}
.rt-btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.rt-btn.primary:hover{background:#014f9b;border-color:#014f9b}
.rt-btn.ghost{border-color:transparent;background:transparent;color:var(--ink2)}
.rt-btn.ghost:hover{background:#f4f6f9}
.rt-btn[aria-expanded="true"] .rt-ico{transform:rotate(180deg)}
.rt-btn .rt-ico{transition:transform .2s var(--ease)}
.rt-btn:disabled{opacity:.5;cursor:not-allowed}
.rt-fold{display:flex;gap:8px;align-items:center;min-height:32px;margin:16px 0 8px;padding:0;border:0;background:none;font-size:13px;line-height:20px;font-weight:600;color:var(--ink2);cursor:pointer}
.rt-fold:hover{color:var(--ink)}
.rt-fold .rt-ico{width:16px;height:16px;transition:transform .2s var(--ease)}
.rt-fold[aria-expanded="true"] .rt-ico{transform:rotate(180deg)}

/* 空态 / 加载态 / 出错态 / 无权限态 */
.rt-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:48px 24px;border:1px dashed var(--line);border-radius:12px;text-align:center;color:var(--ink2)}
.rt-empty .rt-ico{width:40px;height:40px;stroke-width:1.25}
.rt-empty b{color:var(--ink);font-size:20px;line-height:28px;font-weight:600}
.rt-empty span{max-width:480px}
.rt-skel{display:flex;flex-direction:column;gap:8px}
.rt-skel i{display:block;height:72px;border-radius:12px;background:#eceff3;animation:rt-pulse 1.4s ease-in-out infinite}
@keyframes rt-pulse{50%{opacity:.5}}

/* 提示条（浮层，带影） */
.rt-toast{position:fixed;left:50%;bottom:24px;z-index:60;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 16px;border-radius:12px;background:var(--ink);color:#fff;
  box-shadow:0 8px 24px rgba(16,24,40,.16);animation:rt-toast .25s var(--ease)}
@keyframes rt-toast{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}

@media (max-width:760px){
  .rt{padding:16px}
  .rt-head{gap:12px}
  .rt-head-act,.rt-head-act .rt-btn{width:100%}
  .rt-line{flex-direction:column;align-items:stretch}
  .rt-acts{justify-content:stretch}
  .rt-acts .rt-btn{flex:1 1 auto;min-width:0}
  .rt-btn,.rt-fold{min-height:44px}
  .rt-btn{height:auto;padding:8px 16px;white-space:normal;line-height:20px;text-align:center}   /* 手机上按钮宽度不够时文字换行、按钮自己变高，别让字溢出去叠在邻居上（chad 11/13 截图） */
  .rt-form select,.rt-form input[type="text"],.rt-form input[type="number"],.rt-form input[type="date"]{min-height:44px}
  .rt-grid{grid-template-columns:minmax(0,1fr)}
  .rt-btns .rt-btn{flex:1 1 auto;min-width:0}
}
@media (prefers-reduced-motion:reduce){.rt *,.rt-toast{animation:none!important;transition:none!important}}

/* 壳（skin.css）给 #extApp 里所有 button 统一加了 40 高 / 16 内边距 / 1px 线 / 白底：折叠条、幽灵按钮不能吃这套（同 tenant_intel.css 的做法）。 */
html.sh-on #extApp .rt button.rt-fold{height:auto;min-height:32px;padding:0;border:0;background:none;color:var(--ink2);font-size:13px;font-weight:600;line-height:20px}
html.sh-on #extApp .rt button.rt-fold:hover:not(:disabled){background:none;border:0;color:var(--ink)}
html.sh-on #extApp .rt button.rt-btn.ghost{border-color:transparent;background:transparent;color:var(--ink2)}
html.sh-on #extApp .rt button.rt-btn.ghost:hover:not(:disabled){background:#f4f6f9;border-color:transparent}
@media (max-width:760px){html.sh-on #extApp .rt button.rt-fold{min-height:44px}}

/* ===== 手机端（§3C，11/14 本地起草，zc-fast）：周期事务 ===== */
@media (max-width:900px){
  /* 结论带：蓝底白字，包含标题、关键数、按钮和提示 */
  .rt-head{
    background:var(--blue-soft);
    border-radius:12px;
    padding:16px;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    margin-bottom:12px;
  }
  .rt-head h1{
    font-size:20px;
    line-height:28px;
    margin-bottom:4px;
  }
  .rt-sentence{
    margin:0 0 12px;
  }
  .rt-keys{
    margin-top:0;
    gap:8px;
  }
  .rt-key{
    flex:1 1 0;
    min-width:0;
    padding:8px 12px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  .rt-key .k{font-size:13px;line-height:20px;color:var(--ink2)}
  .rt-key .v{font-size:20px;line-height:28px;font-weight:600}
  .rt-tip{
    margin:12px 0 0;
    padding-top:12px;
    border-top:1px solid var(--line);
    font-size:13px;
    line-height:20px;
    color:var(--ink2);
  }
  .rt-tip b{color:var(--ink);font-weight:600}

  /* 主按钮：全宽，高44，白字 */
  .rt-head-act{
    width:100%;
    margin-top:0;
  }
  .rt-head-act .rt-btn{
    width:100%;
    min-height:44px;
    height:44px;
    font-size:16px;
    line-height:24px;
    white-space:nowrap;
  }

  /* 事务行：保持白卡，内容区垂直堆叠 */
  .rt-line{
    flex-direction:column;
    align-items:stretch;
    padding:16px;
  }
  .rt-main{
    margin-bottom:12px;
  }
  .rt-main .t{font-size:16px;line-height:24px}
  .rt-main .s{margin-top:8px}
  .rt-main .m,.rt-main .c{margin-top:8px}

  /* 操作区：按钮换行，全宽，高44 */
  .rt-acts{
    justify-content:stretch;
    gap:8px;
    margin-top:0;
  }
  .rt-acts .rt-btn{
    flex:1 1 auto;
    min-width:0;
    min-height:44px;
    height:44px;
    padding:0 12px;
    white-space:nowrap;
    font-size:16px;
    line-height:24px;
  }

  /* 展开区域：表单控件高44 */
  .rt-space.on>.rt-form{
    padding:16px;
    border-top:1px solid var(--line);
  }
  .rt-adhoc{
    margin:0;
    border:0;
    border-radius:0;
    padding:0;
    background:transparent;
  }
  .rt-form label{
    margin:16px 0 8px;
    font-size:13px;
    line-height:20px;
  }
  .rt-form label:first-child{margin-top:16px}
  .rt-form input[type="text"],
  .rt-form input[type="number"],
  .rt-form input[type="date"],
  .rt-form textarea,
  .rt-form select{
    min-height:44px;
    padding:8px 12px;
    font-size:16px;
  }
  .rt-form select{height:44px}
  .rt-form textarea{min-height:80px}

  /* 备注保存按钮组：全宽，高44 */
  .rt-btns{
    flex-direction:column;
    gap:8px;
    margin-top:16px;
  }
  .rt-btns .rt-btn{
    width:100%;
    min-height:44px;
    height:44px;
    justify-content:center;
    white-space:nowrap;
    font-size:16px;
    line-height:24px;
  }

  /* 折叠条：高44 */
  .rt-fold{
    min-height:44px;
    padding:12px 0;
    margin:16px 0 8px;
    font-size:16px;
    line-height:24px;
  }
  .rt-fold .rt-ico{width:20px;height:20px}

  /* 步骤列表：高44 */
  .rt-steps li{min-height:44px}
  .rt-steps .no{width:24px;height:24px;font-size:13px;line-height:24px}
  .rt-steps .lb{font-size:16px;line-height:24px}

  /* 空态：高44按钮 */
  .rt-empty .rt-btn{min-height:44px;height:44px}

  /* 壳覆盖：确保折叠条和幽灵按钮不被壳样式干扰 */
  html.sh-on #extApp .rt button.rt-fold{min-height:44px;padding:12px 0;border:0;background:none;color:var(--ink2);font-size:16px;font-weight:600;line-height:24px}
  html.sh-on #extApp .rt button.rt-btn.ghost{border-color:transparent;background:transparent;color:var(--ink2)}
  html.sh-on #extApp .rt button.rt-btn.ghost:hover:not(:disabled){background:#f4f6f9;border-color:transparent}
}

/* ===== 手机端第二轮（11/14 线上规模）：一屏看到 ≥3 条事项；本地起草 zc-fast，审后原样收 ===== */
@media (max-width:900px){
  .rt-line{padding:12px;gap:0}
  .rt-main{margin-bottom:0}
  .rt-main .t{margin-top:0}
  .rt-main .s{margin-top:4px}
  .rt-main .m{margin-top:4px}
  .rt-main .c{margin-top:4px}
  .rt-acts{margin-top:8px;justify-content:space-between}
  .rt-acts .rt-btn{flex:0 0 auto}
}
@media (min-width:901px){ html.sh-on #extApp .rt{margin-left:0;padding-left:0;padding-right:0} }
@media (min-width:901px){ html.sh-on #extApp .rt .rt-sentence{padding:12px 16px;background:#f5f8fc;border-radius:12px} }
