/* 泰摩道经营监管系统 - 深色金主题 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #10141c; --bg2: #161c28; --panel: #1a2230; --panel2: #202a3a;
  --line: #2a3548; --txt: #e8ecf4; --txt2: #93a0b4;
  --pri: #d4a545; --pri2: #b8862b; --gold: #d4a545; --onpri: #1a1305;
  --ok: #2eaa6e; --warn: #e0a63c; --bad: #e05656; --info: #4a9de0;
}
html, body { height: 100%; }
body {
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(160deg, var(--bg), var(--bg2));
  color: var(--txt); min-height: 100vh;
}
button { font-family: inherit; }
input, select, textarea {
  font-family: inherit; background: var(--bg2); border: 1px solid var(--line);
  color: var(--txt); border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--pri); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2c3850; border-radius: 5px; }

/* 登录门 */
#loginGate { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: radial-gradient(1000px 600px at 50% 30%, #1c2434, var(--bg)); }
.lg-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 38px 42px; width: 400px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lg-mark { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 18px; background: linear-gradient(135deg, var(--pri), var(--pri2)); color: var(--onpri); font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lg-box h1 { font-size: 20px; margin-bottom: 4px; }
.lg-box p { color: var(--txt2); font-size: 12px; margin-bottom: 22px; }
.lg-box input { width: 100%; margin-bottom: 12px; padding: 11px 12px; }
.lg-err { color: var(--bad); font-size: 12px; min-height: 18px; margin-bottom: 4px; }
.lg-box .btn { width: 100%; padding: 11px; font-size: 15px; }

/* 布局 */
#app { display: none; min-height: 100vh; }
#app.ready { display: flex; }
.sidebar { width: 216px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo-zone { display: flex; gap: 10px; align-items: center; padding: 16px 14px; border-bottom: 1px solid var(--line); }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--pri), var(--pri2)); color: var(--onpri); font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center; flex: none; }
.logo-name { font-size: 14px; font-weight: 700; }
.logo-sub { font-size: 11px; color: var(--txt2); }
#nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; color: var(--txt2); cursor: pointer; margin-bottom: 2px; font-size: 13px; }
.nav-item:hover { background: var(--panel2); color: var(--txt); }
.nav-item.on { background: linear-gradient(135deg, rgba(212,165,69,.18), rgba(184,134,43,.12)); color: var(--pri); font-weight: 600; }
.nav-item .ni-ico { display: flex; align-items: center; justify-content: center; flex: none; }
.nav-item .ni-ico svg { width: 17px; height: 17px; display: block; }
.nav-group { font-size: 11px; color: #5c6a80; padding: 12px 12px 4px; letter-spacing: 1px; }
.nav-badge { margin-left: auto; background: var(--bad); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 6px; min-width: 17px; text-align: center; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: rgba(16,20,28,.6); position: sticky; top: 0; z-index: 50; }
.topbar h2 { font-size: 17px; }
.sp { flex: 1; }
.who { color: var(--pri); font-weight: 600; font-size: 13px; }
.hint { color: var(--txt2); font-size: 12px; }
.view { padding: 20px 22px 60px; max-width: 1320px; }

/* ICP 备案号（法规要求：网站底部必须展示并链接工信部） */
.icp-foot { margin-top: auto; padding: 10px 22px 14px; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--txt2); opacity: .75; }
.icp-foot a { color: var(--txt2); text-decoration: none; }
.icp-foot a:hover { color: var(--pri); text-decoration: underline; }

/* 组件 */
.btn { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: var(--onpri); border: none; border-radius: 9px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt2); font-weight: 500; }
.btn.ghost:hover { border-color: var(--pri); color: var(--pri); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.ok { background: linear-gradient(135deg, #35c07e, #279661); color: #06130b; }
.btn.bad { background: linear-gradient(135deg, #e56a6a, #c74444); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.card h3 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--txt2); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid rgba(42,53,72,.55); vertical-align: middle; }
tr:hover td { background: rgba(42,53,72,.25); }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; font-size: 11px; padding: 2px 9px; border: 1px solid; white-space: nowrap; }
.chip.ok { color: #4ecf90; border-color: #2eaa6e55; background: #2eaa6e18; }
.chip.warn { color: #f0bd58; border-color: #e0a63c55; background: #e0a63c18; }
.chip.bad { color: #f07a7a; border-color: #e0565655; background: #e0565618; }
.chip.info { color: #6cb6ef; border-color: #4a9de055; background: #4a9de018; }
.chip.mute { color: var(--txt2); border-color: var(--line); }
.bar { height: 9px; background: var(--bg2); border-radius: 6px; overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri), var(--pri2)); border-radius: 6px; }
.bar > i.ok { background: linear-gradient(90deg, #35c07e, #279661); }
.bar > i.warn { background: linear-gradient(90deg, #e8b64f, #d29526); }
.bar > i.bad { background: linear-gradient(90deg, #e56a6a, #c74444); }
.barrow { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--txt2); }
.barrow b { color: var(--txt); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; }
.kpi .k { font-size: 12px; color: var(--txt2); }
.kpi .v { font-size: 22px; font-weight: 800; margin: 2px 0; }
.kpi .v small { font-size: 12px; color: var(--txt2); font-weight: 400; }
.kpi .s { font-size: 11px; color: var(--txt2); }
.mgr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 16px; border-top: 3px solid var(--pri); }
.mgr-card.h-red { border-top-color: var(--bad); }
.mgr-card.h-yellow { border-top-color: var(--warn); }
.mgr-card.h-green { border-top-color: var(--ok); }
.mgr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--pri), var(--pri2)); color: var(--onpri); font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.mgr-head .nm { font-size: 15px; font-weight: 700; }
.mgr-head .st { font-size: 11px; color: var(--txt2); }
.mini { font-size: 12px; color: var(--txt2); display: flex; justify-content: space-between; padding: 3px 0; }
.mini b { color: var(--txt); font-weight: 600; }
.sec-title { font-size: 12px; color: var(--txt2); margin: 10px 0 6px; display: flex; align-items: center; gap: 6px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sop-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; background: var(--bg2); }
.sop-item.done { border-color: #2eaa6e66; background: #1c2b26; }
.sop-item.late { border-color: #e0565666; }
/* SOP 页签：每日流程 / 每周流程 / 每月流程 / 上交表单 */
.sop-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sop-tabs .stab { padding: 7px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; user-select: none;
  background: var(--bg2); color: var(--txt2); border: 1px solid transparent; transition: .15s; }
.sop-tabs .stab:hover { border-color: var(--line); color: var(--txt); }
.sop-tabs .stab.on { background: var(--gold); color: #1a1a1a; font-weight: 600; }
.sop-tabs .stab i { font-style: normal; font-size: 11px; opacity: .65; margin-left: 5px; }
/* 时间轴标签：区间文字较宽（11:30—12:00），给足宽度并禁止折行 */
.sop-time { font-size: 12px; font-weight: 700; color: var(--pri); width: 88px; flex: none; padding-top: 2px; white-space: nowrap; line-height: 1.35; }
.sop-body { flex: 1; min-width: 0; }
.sop-body .t { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sop-body .d { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.sop-body .b { font-size: 11px; color: #6c7788; margin-top: 3px; }
.sop-act { flex: none; align-self: center; }
.alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--bg2); }
.alert-row.lv-high { border-left: 3px solid var(--bad); }
.alert-row.lv-mid { border-left: 3px solid var(--warn); }
.alert-row.lv-low { border-left: 3px solid var(--info); }
.alert-lv { font-size: 11px; font-weight: 700; flex: none; width: 34px; }
.lv-high .alert-lv { color: var(--bad); } .lv-mid .alert-lv { color: var(--warn); } .lv-low .alert-lv { color: var(--info); }
.alert-ct { flex: 1; font-size: 13px; }
.alert-ct .sub { color: var(--txt2); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 1100px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.fld label { display: block; font-size: 11px; color: var(--txt2); margin-bottom: 3px; }
.fld input, .fld select { width: 100%; }
.fld textarea { width: 100%; resize: vertical; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; }
.rowflex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.score-grade { font-size: 26px; font-weight: 900; padding: 4px 14px; border-radius: 10px; }
.gradeA { color: #4ecf90; background: #2eaa6e22; } .gradeB { color: #f0bd58; background: #e0a63c22; } .gradeC { color: #f07a7a; background: #e0565622; }

/* 弹窗 */
#modalMask { position: fixed; inset: 0; background: rgba(6,9,14,.72); z-index: 900; display: none; align-items: center; justify-content: center; }
#modalMask.show { display: flex; }
#modalBox { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 22px; width: 640px; max-width: 94vw; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
#modalBox h3 { font-size: 16px; margin-bottom: 14px; }

/* toast */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 9999; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--pri); padding: 10px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: tin .25s; }
.toast.ok { border-left-color: var(--ok); } .toast.bad { border-left-color: var(--bad); }
@keyframes tin { from { transform: translateX(30px); opacity: 0; } }
.empty { text-align: center; color: var(--txt2); padding: 30px 0; font-size: 13px; }

/* ===== 云端版标识 ===== */
body.cloudmode .lg-mark { box-shadow: 0 0 0 3px rgba(212,165,69,.25), 0 10px 30px rgba(212,165,69,.2); }
#liveTag { word-break: break-all; }

/* ===== 手机端适配（店长手机打卡） ===== */
.mob-only { display: none; }
@media (max-width: 760px) {
  #app.ready { flex-direction: column; }
  /* 导航改成底部标签栏：图标在上、文字在下，横向可滑，更像原生 APP */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: auto; z-index: 60;
    flex-direction: row; align-items: stretch;
    border-right: none; border-top: 1px solid var(--line);
    background: rgba(14, 19, 26, .96);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .38);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .logo-zone, .side-foot { display: none; }
  /* 备案号避开底部标签栏 */
  .icp-foot { padding-bottom: calc(72px + env(safe-area-inset-bottom)); justify-content: center; }
  #nav {
    display: flex; flex-direction: row; flex: 1; gap: 2px;
    padding: 5px 6px 4px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  #nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto; position: relative; scroll-snap-align: center;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; margin-bottom: 0; padding: 6px 12px 5px; min-height: 52px;
    border-radius: 10px; font-size: 10px; line-height: 1.15; white-space: nowrap;
  }
  .nav-item .ni-ico { font-size: 20px; line-height: 1.05; }
  .nav-item .ni-ico svg { width: 22px; height: 22px; }
  .nav-item .ni-tx { font-size: 10px; letter-spacing: .2px; }
  .nav-badge {
    position: absolute; top: 0; right: 2px; margin: 0;
    font-size: 9px; min-width: 14px; padding: 0 4px; line-height: 14px; border-radius: 7px;
  }
  #liveTag { display: none; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .topbar h2 { font-size: 15px; }
  #clock { display: none; }
  #whoami { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .who-role { display: none; }
  .view { padding: 12px 12px calc(78px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 12px 13px; border-radius: 11px; overflow-x: auto; }
  .kpi .v { font-size: 19px; }
  .sop-item { flex-wrap: wrap; gap: 8px; padding: 9px 10px; }
  .sop-act { width: 100%; text-align: right; align-self: flex-end; }
  .mgr-head .st { display: none; }
  .mob-only { display: inline-flex; }
  .lg-box { width: 88vw; max-width: 380px; padding: 24px 18px; }
  .lg-box input { font-size: 15px; padding: 12px 12px; }
  #modalBox { width: 94vw; padding: 16px; }
  table { font-size: 12px; }
  th, td { padding: 6px 7px; }
  .score-grade { font-size: 20px; }
  #toasts { left: 12px; right: 12px; top: 10px; }
  .toast { text-align: center; }
}

/* ============ 合并版新增：经营数据 / 考勤 / 巡检 ============ */
.biz-quad { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.biz-quad > div { background: var(--bg2, #f4f6f8); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.biz-quad span { font-size: 11px; color: var(--txt2, #8a94a6); }
.biz-quad b { font-size: 16px; }
.biz-quad i { font-size: 11px; font-style: normal; color: var(--txt2, #8a94a6); }
.biz-quad i.up { color: #d05050; }
.biz-quad i.down { color: #22a06b; }
.chanbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #dde3ea; margin: 4px 0; }
.chanbar i { display: block; height: 100%; }
table.trend td, table.trend th { padding: 5px 10px; }
table.trend .now-row td { background: rgba(232, 145, 45, 0.10); }
table.trend .sum-row td, table .sum-row td { border-top: 2px solid var(--line); background: rgba(212, 175, 55, 0.12); }
.proj-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.proj-row .pr-n { width: 76px; font-size: 12px; color: var(--txt2, #8a94a6); flex-shrink: 0; }
.proj-row .bar { flex: 1; height: 8px; }
.proj-row b { font-size: 12px; flex-shrink: 0; }
.proj-row .hint { font-size: 11px; flex-shrink: 0; }
/* === 经营数据新版式 === */
.sec-bar { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sec-bar h2 { font-size: 16px; margin: 0; }
.biz-major { text-align: center; padding: 8px 0 4px; }
.biz-major .v { font-size: 30px; color: var(--gold); font-weight: 600; }
.biz-major .v small { font-size: 13px; }
.biz-major-s { font-size: 12px; color: var(--txt2, #8a94a6); margin-top: 2px; }
.biz-quad i.up, .biz-quad i.up { color: #d05050; }
.kpi.sm { padding: 8px 10px; }
.kpi.sm .v { font-size: 18px; }
.proj-grid { display: grid; grid-template-columns: 90px repeat(3, 1fr) 80px; align-items: center; gap: 8px; margin: 6px 0; }
.proj-grid.proj-head { font-size: 11px; color: var(--txt2, #8a94a6); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.proj-grid .pr-n { font-size: 12px; }
.proj-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.proj-cell .bar { flex: 1; height: 10px; min-width: 30px; }
.proj-cell b { font-size: 12px; flex-shrink: 0; }
.proj-head .proj-cell { padding-left: 0; }
.proj-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.proj-tabs .ptab { padding: 4px 12px; border-radius: 14px; font-size: 12px; cursor: pointer;
  background: var(--bg2, #f4f6f8); color: var(--txt2, #8a94a6); border: 1px solid transparent; }
.proj-tabs .ptab:hover { border-color: var(--line); }
.proj-tabs .ptab.on { background: var(--gold); color: #1a1a1a; font-weight: 600; }
/* 经营总览月份筛选器（sec-bar 右上角） */
.ym-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.ym-tabs .ytab { padding: 3px 9px; border-radius: 12px; font-size: 11px; cursor: pointer; white-space: nowrap;
  background: var(--bg2, #f4f6f8); color: var(--txt2, #8a94a6); border: 1px solid transparent; transition: .15s; }
.ym-tabs .ytab:hover { border-color: var(--gold); color: var(--txt); }
.ym-tabs .ytab.on { background: var(--gold); color: #1a1a1a; font-weight: 700; }
.kpi .mini { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.kpi .mini b { color: var(--txt); }
table.top5 { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.top5 td, table.top5 th { padding: 6px 10px; text-align: center; font-size: 12px; border-bottom: 1px solid var(--line); }
table.top5 tr td:first-child { width: 32px; color: var(--gold); font-weight: 700; }
table.top5 tr td:nth-child(2) { text-align: left; }
table.tech-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.tech-table td, table.tech-table th { padding: 5px 6px; text-align: center; font-size: 11px; border-bottom: 1px solid var(--line); }
table.tech-table tr td:first-child { width: 36px; color: var(--txt2, #8a94a6); }
table.tech-table tr td:nth-child(2) { text-align: left; font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.sec-title-bar { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sec-title-bar h2 { font-size: 16px; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.cal-cell { border-radius: 8px; padding: 6px; text-align: center; background: var(--bg2, #f4f6f8); }
.cal-cell b { display: block; font-size: 13px; }
.cal-cell span { font-size: 10px; color: var(--txt2, #8a94a6); }
.cal-cell.cal-ok { background: rgba(34, 160, 107, 0.14); }
.cal-cell.cal-late { background: rgba(232, 145, 45, 0.18); }
.cal-cell.cal-miss { background: rgba(208, 80, 80, 0.16); }
table.cal td, table.cal th { padding: 4px 6px; text-align: center; font-size: 11px; }
table.cal td.cal-ok { background: rgba(34, 160, 107, 0.16); }
table.cal td.cal-late { background: rgba(232, 145, 45, 0.20); }
table.cal td.cal-miss { background: rgba(208, 80, 80, 0.18); }
table.cal td.cal-mute { color: var(--txt2, #8a94a6); }
.cal-scroll { overflow-x: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: middle; }
.dot.ok { background: #22a06b; } .dot.warn { background: #e8912d; } .dot.bad { background: #d05050; }
.insp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.insp-item { display: flex; gap: 10px; padding: 8px; border: 1px solid var(--line, #e3e8ef); border-radius: 10px; cursor: pointer; }
.insp-item:hover { border-color: var(--pri, #2f6fed); }
.insp-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #dde3ea; flex-shrink: 0; position: relative; }
.insp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.insp-thumb video { width: 100%; height: 100%; object-fit: cover; background: #1a1a1a; }
.insp-thumb .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 11px; color: #8a94a6; }
/* 视频角标：右下角小「▶ 视频」，与缩略图区分 */
.insp-thumb .vbadge { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,.7); color: #fff;
  font-size: 9px; padding: 1px 4px; border-radius: 4px; line-height: 1.4; letter-spacing: .2px; }
.insp-meta { flex: 1; min-width: 0; font-size: 12px; }
.insp-prev img { max-width: 260px; max-height: 180px; border-radius: 8px; margin-top: 8px; }
.insp-prev video { max-width: 100%; max-height: 240px; border-radius: 8px; margin-top: 8px; }
.insp-big { max-width: 100%; max-height: 60vh; border-radius: 10px; display: block; margin: 0 auto; }
.insp-list video { pointer-events: none; }   /* 列表里只当封面，点击才进详情播放 */
.mt4 { margin-top: 4px; }

/* 手机端表单与表格适配 */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr !important; }
  .grid.g2, .grid.g3 { grid-template-columns: 1fr !important; }
  #view { overflow-x: hidden; }
  .card { overflow-x: auto; }
  .insp-list { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .biz-quad b { font-size: 14px; }
  .proj-row .hint { display: none; }
  input, select, textarea { max-width: 100%; }
}

/* ===== 手机端 APP（PWA）===== */
/* 全屏独立运行时避开手机刘海/底部手势条（底部栏的内边距已在 760px 媒体查询里处理） */
@media (display-mode: standalone) {
  .topbar  { padding-top: calc(14px + env(safe-area-inset-top)); }
  #loginGate { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
/* iOS 输入框字号小于 16px 会在聚焦时自动放大页面 */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px !important; }
  .lg-box input { font-size: 16px !important; }
}
/* 去掉 iOS 点击时的灰色高亮，更像原生 APP */
body { -webkit-tap-highlight-color: transparent; }

/* 经营概括：月度数据表（数字右对齐） */
table.biz-plain td, table.biz-plain th { padding: 6px 12px; }
table.biz-plain td { text-align: right; font-variant-numeric: tabular-nums; }
table.biz-plain td:first-child, table.biz-plain th:first-child { text-align: left; }

/* 月度任务 · 周目标追盯 */
.goal-tabs .gtab { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; cursor: pointer; user-select: none; color: var(--txt2); margin-right: 6px; }
.goal-tabs .gtab:hover { border-color: var(--gold); color: var(--txt); }
.goal-tabs .gtab.on { background: var(--gold); color: #1a1a1a; font-weight: 600; }
.goal-in { width: 68px; padding: 4px 6px; border: 1px dashed var(--gold); border-radius: 6px; background: rgba(212, 165, 69, .10); text-align: center; font-size: 13px; color: var(--txt); }
.goal-in:focus { border-style: solid; outline: none; }
.goal-done { min-width: 76px; }
.lg-icp { margin-top: 16px; font-size: 11px; color: var(--txt2); opacity: .7; }
.lg-icp a { color: var(--txt2); text-decoration: none; }
.lg-icp a:hover { color: var(--pri); text-decoration: underline; }
