/* 芝士农场 · 管理后台 */
:root {
  --brand: #BE1737;
  --brand-deep: #C87F24;
  --ink: #141414;
  --ink2: #4A4A50;
  --muted: #8A8A8E;
  --line: #EBEBEE;
  --bg: #F5F5F6;
  --card: #FFFFFF;
  --down: #2F7D5F;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.hide { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
.grow { flex: 1; }

/* ---------- 登录 ---------- */
/* 旧版登录容器已废弃（新版见文件末尾 .login） */
.login-box {
  width: 380px; background: #fff; border-radius: 16px; padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center;
}
.brand-lg { font-size: 24px; font-weight: 700; }
.brand-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.qr-wrap { margin: 22px 0 18px; }
.qr-img {
  width: 180px; height: 180px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 8px;
  font-size: 12px; color: var(--muted); background: #fafafa;
}
.qr-img img { width: 100%; height: 100%; }
.qr-tip { font-size: 12px; color: var(--muted); margin: 10px 0; }
.pw-wrap { display: flex; gap: 8px; }
.pw-wrap input {
  flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
  font-size: 14px; outline: none;
}
.pw-wrap input:focus { border-color: var(--brand); }
.login-msg { min-height: 20px; font-size: 12px; color: var(--brand); margin-top: 10px; }

/* ---------- 顶部 ---------- */
.top {
  display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 20px;
  background: #141414; color: #fff; position: sticky; top: 0; z-index: 10;
}
.top-brand { font-weight: 700; letter-spacing: .5px; }
.tabs { display: flex; gap: 4px; }
.tabs a {
  padding: 6px 14px; border-radius: 8px; color: rgba(255,255,255,.7); cursor: pointer; font-size: 13px;
}
.tabs a:hover { background: rgba(255,255,255,.08); }
.tabs a.on { background: var(--brand); color: #fff; font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who { font-size: 12px; color: rgba(255,255,255,.65); }

/* ---------- 布局 ---------- */
.main { padding: 18px 20px 40px; max-width: 1500px; margin: 0 auto; }
.view { }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.card {
  background: var(--card); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(20,20,20,.05);
}
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }

select, input[type=date] {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px;
  background: #fff; font-size: 13px; color: var(--ink2); outline: none;
}
.search {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px;
  font-size: 13px; min-width: 180px; outline: none;
}
.search:focus, select:focus { border-color: var(--brand); }
.btn {
  height: 34px; padding: 0 16px; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #141414; color: #fff; border-radius: 12px; padding: 16px 18px; }
.kpi .k { font-size: 12px; color: rgba(255,255,255,.6); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 4px; }
.kpi.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.kpi.light .k, .kpi.light .s { color: var(--muted); }
.up { color: var(--brand); }
.down { color: var(--down); }

/* ---------- 店型 / 趋势 ---------- */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.titem { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.titem .n { font-size: 12px; color: var(--muted); }
.titem .v { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.titem .y { font-size: 12px; margin-top: 2px; }

.trend { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.trend .bar { flex: 1; background: linear-gradient(180deg, #f3c9d0, #f6dfe3); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.trend .bar:hover { background: var(--brand); }
.trend .bar span { position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; font-size: 11px; color: var(--muted); display: none; white-space: nowrap; }
.trend .bar:hover span { display: block; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; max-height: 520px; }
.table-wrap.tall { max-height: 640px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: #fafafb; font-weight: 600; color: var(--ink2); font-size: 12px; z-index: 1; }
tbody tr:hover { background: #fcfcfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #f2f2f4; color: var(--ink2); }
.tag.ok { background: rgba(47,125,95,.12); color: var(--down); }
.tag.warn { background: rgba(200,127,36,.14); color: #a8641a; }
.tag.bad { background: rgba(190,23,55,.1); color: var(--brand); }

/* ---------- 订单 ---------- */
.orders { display: flex; flex-direction: column; gap: 10px; }
.order { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(20,20,20,.05); }
.ohead { display: flex; align-items: center; gap: 12px; }
.ono { font-weight: 600; }
.ometa { color: var(--muted); font-size: 12px; }
.ohead .grow { flex: 1; }
.obody { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.part { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.part .pname { font-weight: 600; font-size: 13px; }
.part .prow { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.part .pacts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.part input { height: 30px; width: 110px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 13px; }
.lines { margin-top: 10px; font-size: 12px; color: var(--ink2); }
.lines table { font-size: 12px; }
.addr { margin-top: 8px; font-size: 12px; color: var(--ink2); background: #f7f7f8; border-radius: 8px; padding: 8px 10px; }

/* ---------- 运维 ---------- */
.log { background: #141414; color: #d7d7dc; border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.6; max-height: 520px; overflow: auto; white-space: pre-wrap; }

/* ---------- toast / 弹层 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%);
  background: rgba(20,20,20,.9); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 99;
}
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 460px; max-width: 92vw; }
.modal h4 { margin: 0 0 14px; font-size: 15px; }
.modal .fld { margin-bottom: 10px; }
.modal .fld label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.modal .fld input, .modal .fld select { width: 100%; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* 登录二维码下面那行「可手输的码」 */
.qr-code {
  margin: 6px 0 4px;
  font: 700 24px/1.3 ui-monospace, Consolas, monospace;
  letter-spacing: 4px;
  color: #BE1737;
  min-height: 30px;
}

/* ---------- 打印设置弹层 ---------- */
/* 独立类名：页面里原有的 .modal 是「内容卡片」，复用会把宽度锁成 460px */
.pmask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.pmask.hide { display: none; }
.modal-box {
  width: 380px; background: #fff; border-radius: 12px; padding: 20px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.modal-title { font-size: 16px; font-weight: 700; color: #141414; }
.modal-sub { margin-top: 4px; font-size: 12px; color: #8a8a90; }
.modal-row { margin: 16px 0 8px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.modal-label { font-size: 13px; color: #4a4a50; }
.modal-opt { font-size: 13px; color: #141414; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.modal-tip { font-size: 11.5px; color: #9a9aa0; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 角色管理 / 权限树 ---------- */
.subtabs {
  display: flex; gap: 22px; margin: 4px 0 14px;
  border-bottom: 1px solid #ececef; padding-bottom: 0;
}
.subtabs a {
  font-size: 14px; color: #6b6b72; text-decoration: none; padding: 8px 2px 10px;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.subtabs a.on { color: #141414; font-weight: 600; border-bottom-color: #f0b400; }
.subtabs.small { margin: 10px 0; gap: 16px; }
.subtabs.small a { font-size: 13px; }

.role-edit { display: flex; gap: 16px; align-items: flex-start; }
.role-left { flex: 1 1 60%; min-width: 0; }
.role-right { flex: 0 0 320px; }

.perm-tree { max-height: 520px; overflow: auto; border-top: 1px solid #f0f0f2; margin-top: 6px; }
.perm-mod { padding: 8px 2px; border-bottom: 1px dashed #eee; }
.perm-mod-name { font-size: 13px; font-weight: 600; color: #141414; display: flex; align-items: center; gap: 6px; }
.perm-acts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0 22px; }
.perm-acts label { font-size: 12px; color: #4a4a50; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

.link { color: #be1737; cursor: pointer; text-decoration: none; }
td.c, th.c { text-align: center; }

/* ---------- 角色：门店选择器 ---------- */
.bulk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.chip {
  padding: 3px 10px; border-radius: 999px; background: #f3f3f5; color: #4a4a50;
  font-size: 12px; cursor: pointer; border: 1px solid transparent; user-select: none;
}
.chip:hover { background: #eaeaea; }
.chip.on { background: #be1737; color: #fff; border-color: #be1737; }
.sea.small { height: 26px; font-size: 12px; padding: 0 8px; min-width: 130px; }
.store-list {
  max-height: 240px; overflow: auto; border: 1px solid #ececef; border-radius: 8px;
  padding: 6px 8px; margin-top: 6px; background: #fcfcfd;
}
.store-it { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 0; color: #2a2a30; }
.store-it .meta { color: #9a9aa0; font-size: 11px; }
.region-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- 账号弹层 ---------- */
.modal-box.wide { width: 460px; }
.kv { margin: 12px 0 4px; }
.kv div { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dotted #eee; font-size: 13px; }
.kv b { width: 92px; color: #6b6b72; font-weight: 400; flex: 0 0 92px; }
.kv span { color: #141414; word-break: break-all; }
.act-links { display: inline-flex; gap: 10px; font-size: 12px; }
.act-links a { color: #be1737; cursor: pointer; text-decoration: none; }
.act-links a.grey { color: #8a8a90; }

/* ---------- 看板：小程序风格 ---------- */
.hero {
  background: #141414; color: #fff; border-radius: 18px; padding: 22px 24px 18px;
  margin-bottom: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.hero-top { display: flex; align-items: center; gap: 10px; }
.hero-label { font-size: 13px; color: #b9b9bd; }
.hero-badge {
  margin-left: auto; background: #be1737; color: #fff; font-size: 12px;
  padding: 4px 12px; border-radius: 999px; font-weight: 600;
}
.hero-big { font-size: 42px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 16px; }
.hero-sub { font-size: 12px; color: #9a9aa0; margin: -8px 0 12px; }
.hero-grid { display: flex; gap: 46px; border-top: 1px solid #2a2a2c; padding-top: 14px; }
.hero-grid div { display: flex; flex-direction: column; gap: 4px; }
.hero-grid span { font-size: 12px; color: #9a9aa0; }
.hero-grid b { font-size: 22px; font-weight: 700; color: #fff; }
.hero-grid b.up { color: #ff6b8a; }
.hero-grid b.down { color: #4ec9a4; }
.hero-grid b.mute { color: #d0d0d4; }
.hero-note { margin-top: 14px; font-size: 11.5px; color: #7c7c84; line-height: 1.6; }

.chart { padding: 4px 0 0; }
.line-chart { width: 100%; height: 230px; display: block; }
.line-chart .grid { stroke: #f0f0f2; stroke-width: 1; }
.line-chart .axis { fill: #9a9aa0; font-size: 10px; }
.line-chart .area { fill: rgba(190, 23, 55, 0.08); stroke: none; }
.line-chart .l26 { fill: none; stroke: #be1737; stroke-width: 2.2; stroke-linejoin: round; }
.line-chart .l25 { fill: none; stroke: #b9b9bd; stroke-width: 1.8; stroke-dasharray: 4 4; }

.legend { font-size: 12px; color: #6b6b72; display: flex; align-items: center; gap: 6px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend .dot.red { background: #be1737; }
.legend .dot.grey { background: #c9c9cd; margin-left: 10px; }

.weeks { display: flex; flex-direction: column; }
.week-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 2px; border-bottom: 1px dashed #f0f0f2;
}
.week-row:last-child { border-bottom: none; }
.wk-l { display: flex; flex-direction: column; gap: 3px; }
.wk-l b { font-size: 14px; color: #141414; }
.wk-l .muted { font-size: 11.5px; }
.wk-r { display: flex; align-items: center; gap: 10px; }
.wk-r b { font-size: 16px; font-weight: 700; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f3f3f5; }
.badge.up { background: #ffe9ee; color: #be1737; }
.badge.down { background: #e6f7f1; color: #12855f; }

.mini-select {
  height: 30px; border-radius: 8px; border: 1px solid #e3e3e6; background: #fff;
  font-size: 12.5px; color: #141414; padding: 0 8px;
}
.muted.small { font-size: 11.5px; font-weight: 400; color: #9a9aa0; margin-left: 8px; }

/* ---------- 按店型：小卡片（跟看板其他卡片统一） ---------- */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type {
  background: #fff; border: 1px solid #ececef; border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.type span { font-size: 12px; color: #8a8a90; }
.type b { font-size: 20px; font-weight: 700; color: #141414; margin: 2px 0 1px; font-variant-numeric: tabular-nums; }
.type em { font-size: 12px; font-style: normal; }
.type em.up { color: #be1737; }
.type em.down { color: #12855f; }

/* ---------- 左侧子导航（仿美团管家） ---------- */
.shell { display: flex; align-items: stretch; min-height: calc(100vh - 56px); }
.side {
  flex: 0 0 190px; background: #fff; border-right: 1px solid #ececef;
  padding: 14px 10px; position: sticky; top: 56px; align-self: flex-start;
  min-height: calc(100vh - 56px);
}
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; font-size: 13.5px;
  color: #3d3d43; text-decoration: none; cursor: pointer;
}
.side a i { font-style: normal; font-size: 13px; color: #9a9aa0; width: 16px; text-align: center; }
.side a:hover { background: #f6f6f8; }
.side a.on { background: #fff6d9; color: #141414; font-weight: 600; }
.side a.on i { color: #f0b400; }
.shell .main { flex: 1 1 auto; min-width: 0; }

/* 自定义区间 / 时段 */
.range { display: inline-flex; align-items: center; gap: 6px; }
.range .date, .hour-in {
  height: 30px; border: 1px solid #e3e3e6; border-radius: 8px; padding: 0 8px;
  font-size: 12.5px; color: #141414; background: #fff;
}
.hour-in { width: 60px; }
/* 可排序表头 */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: #be1737; }
th.sortable .ar { font-size: 9px; color: #c9c9cd; margin-left: 3px; }
th.sortable.on .ar { color: #be1737; }

/* ---------- 门店树（集团 → 店型 → 门店） ---------- */
.store-list.tree { padding: 4px 6px; max-height: 300px; }
.tree-root, .tree-g, .store-it {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  padding: 4px 2px; color: #2a2a30; cursor: pointer;
}
.tree-root { font-weight: 600; border-bottom: 1px solid #eee; padding-bottom: 7px; margin-bottom: 4px; }
.tree-g { font-weight: 600; color: #141414; }
.tg-arrow { font-size: 10px; color: #9a9aa0; width: 12px; text-align: center; }
.tree-items { padding-left: 26px; }
.tree-items.hide { display: none; }
.tree-group .store-it { font-weight: 400; color: #3d3d43; }
.tree-group .store-it:hover { background: #f7f7f9; border-radius: 6px; }
.tree-root .meta, .tree-g .meta { font-weight: 400; color: #9a9aa0; font-size: 11px; margin-left: 4px; }

/* TQ 出餐三级页签 */
.subtabs3 { display: flex; gap: 26px; border-bottom: 1px solid #ececef; margin: 2px 0 14px; }
.subtabs3 a {
  font-size: 14px; color: #6b6b72; text-decoration: none; padding: 8px 2px 10px;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.subtabs3 a.on { color: #141414; font-weight: 600; border-bottom-color: #f0b400; }
.pick-wrap { position: relative; display: inline-block; }
.pick-panel {
  position: absolute; top: 36px; left: 0; z-index: 50; width: 300px; background: #fff;
  border: 1px solid #e6e6ea; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.12);
  padding: 10px;
}
/* 超时热力色 */
.heat-0 { background: #e9f8f1; color: #12855f; }
.heat-1 { background: #fff8e1; color: #8a6d00; }
.heat-2 { background: #fff0e0; color: #a85b00; }
.heat-3 { background: #ffe4e6; color: #b3122e; }
.heat-4 { background: #ffd0d6; color: #8f0a22; font-weight: 700; }

/* 出餐热力色阶（与小程序同一套 Excel 色阶） */
.heat-l0 { background: #63BE7B; color: #0F3A20; }
.heat-l1 { background: #A9D08E; color: #17351F; }
.heat-l2 { background: #FFEB84; color: #4A3A00; }
.heat-l3 { background: #F4A25C; color: #4A2200; }
.heat-l4 { background: #F8696B; color: #ffffff; }
.heat-l0, .heat-l1, .heat-l2, .heat-l3, .heat-l4 {
  display: inline-block; min-width: 62px; padding: 2px 8px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

/* 当前页用不到但不能隐藏的控件：置灰 */
.off { opacity: .38; pointer-events: none; }
.kds-bar { flex-wrap: wrap; row-gap: 8px; }
.kds-bar .search { min-width: 130px; }
#kds-type-chips .chip { font-size: 11.5px; padding: 2px 9px; }

/* ---------- 登录页（美团样式，品牌红 #BE1737） ---------- */
.login { min-height: 100vh; display: flex; background: #fff; }
.login-hero {
  flex: 1 1 58%; background: linear-gradient(135deg, #be1737 0%, #8f0f28 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; padding: 40px;
}
.lh-inner { max-width: 460px; }
.lh-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.lh-logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; object-fit: contain; }
.lh-name { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.lh-sub { font-size: 12.5px; color: rgba(255,255,255,.75); margin-top: 3px; }
.lh-title { font-size: 34px; font-weight: 800; letter-spacing: 1px; line-height: 1.35; }
.lh-feats { list-style: none; padding: 0; margin: 34px 0 0; }
.lh-feats li { font-size: 13.5px; color: rgba(255,255,255,.86); padding: 9px 0 9px 18px; position: relative; line-height: 1.6; }
.lh-feats li:before { content: ''; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: #ffd9e1; }
.lh-feats b { color: #fff; margin-right: 8px; font-weight: 700; }
.lh-foot { margin-top: 46px; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: 1px; }

.login-panel { flex: 1 1 42%; display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px 24px; }
.lp-card { width: 360px; }
.lp-tabs { display: flex; gap: 28px; border-bottom: 1px solid #eee; margin-bottom: 26px; }
.lp-tabs a {
  font-size: 16px; color: #8a8a90; text-decoration: none; padding: 0 2px 12px;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.lp-tabs a.on { color: #141414; font-weight: 700; border-bottom-color: #be1737; }
.lp-pane .fld { margin-bottom: 14px; }
.lp-input {
  width: 100%; height: 46px; border: 1px solid #e3e3e6; border-radius: 8px;
  padding: 0 14px; font-size: 14px; color: #141414; background: #fafafb;
}
.lp-input:focus { outline: none; border-color: #be1737; background: #fff; }
.lp-btn { width: 100%; height: 46px; border-radius: 8px; background: #be1737; color: #fff; font-size: 15px; font-weight: 600; border: none; cursor: pointer; }
.lp-btn:hover { background: #a5122f; }
.lp-row { display: flex; justify-content: space-between; margin-top: 14px; }
.lp-link { font-size: 12.5px; color: #be1737; cursor: pointer; text-decoration: none; }
.lp-link.grey { color: #9a9aa0; }
.qr-img { width: 200px; height: 200px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  border: 1px solid #eee; border-radius: 12px; background: #fafafb; color: #9a9aa0; font-size: 12.5px; text-align: center; padding: 8px; }
.qr-img img { width: 100%; height: 100%; object-fit: contain; }
.qr-code { text-align: center; margin: 12px 0 4px; font: 700 22px/1.4 ui-monospace, Consolas, monospace; letter-spacing: 4px; color: #be1737; min-height: 28px; }
.qr-tip { text-align: center; font-size: 12px; color: #8a8a90; line-height: 1.7; }
.login-msg { margin-top: 12px; font-size: 12.5px; color: #be1737; min-height: 18px; }
.login-msg.ok { color: #12855f; }
@media (max-width: 900px) {
  .login { flex-direction: column; }
  .login-hero { flex: none; padding: 28px 22px; }
  .lh-title { font-size: 24px; }
  .lh-feats, .lh-foot { display: none; }
  .login-panel { flex: 1; }
}

/* ================= 登录页 v2：红 / 黑 / 白，简约克制 ================= */
.login {
  position: fixed; inset: 0; display: flex; background: #fff; overflow: hidden;
}
.login-hero {
  position: relative; width: 56%; height: 100%; flex: 0 0 56%;
  background: #8e1230;
  background-image:
    radial-gradient(120% 90% at 12% 8%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(150deg, #a31634 0%, #7d0d24 100%);
  display: flex; align-items: center; padding: 0 7vw; color: #fff; overflow: hidden;
}
.login-hero:after {
  content: ''; position: absolute; right: -120px; bottom: -160px; width: 460px; height: 460px;
  border-radius: 50%; background: rgba(255,255,255,.04); pointer-events: none;
}
.lh-inner { position: relative; z-index: 1; width: 100%; max-width: 460px; }
.lh-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 56px; }
.lh-logo {
  width: 48px; height: 48px; border-radius: 12px; background: #fff; object-fit: contain;
  padding: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.lh-name { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.lh-sub { font-size: 11.5px; color: rgba(255,255,255,.62); margin-top: 4px; letter-spacing: 1px; }
.lh-title { font-size: 30px; font-weight: 700; letter-spacing: 3px; line-height: 1.5; margin-bottom: 8px; }
.lh-desc { font-size: 13px; color: rgba(255,255,255,.62); letter-spacing: 1px; margin-bottom: 44px; }
.lh-feats { list-style: none; padding: 0; margin: 0; }
.lh-feats li {
  display: flex; align-items: baseline; gap: 14px; padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,.10); font-size: 12.5px; color: rgba(255,255,255,.66);
}
.lh-feats li:last-child { border-bottom: 1px solid rgba(255,255,255,.10); }
.lh-feats b { flex: 0 0 76px; font-size: 13px; font-weight: 600; color: #fff; letter-spacing: 1px; }
.lh-foot {
  margin-top: 56px; font-size: 11px; color: rgba(255,255,255,.34); letter-spacing: 2px;
}

.login-panel {
  flex: 1 1 44%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 0 6vw;
}
.lp-card { width: 100%; max-width: 352px; }
.lp-tabs { display: flex; gap: 30px; border-bottom: 1px solid #eee; margin-bottom: 30px; }
.lp-tabs a {
  font-size: 15px; color: #9a9aa0; text-decoration: none; padding: 0 1px 13px;
  border-bottom: 2px solid transparent; cursor: pointer; letter-spacing: .5px;
  transition: color .15s;
}
.lp-tabs a:hover { color: #141414; }
.lp-tabs a.on { color: #141414; font-weight: 600; border-bottom-color: #be1737; }
.lp-pane .fld { margin-bottom: 14px; }
.lp-input {
  width: 100%; height: 46px; border: 1px solid #e6e6ea; border-radius: 6px;
  padding: 0 14px; font-size: 14px; color: #141414; background: #fbfbfc;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.lp-input::placeholder { color: #b4b4ba; }
.lp-input:focus {
  outline: none; border-color: #be1737; background: #fff;
  box-shadow: 0 0 0 3px rgba(190,23,55,.08);
}
.lp-btn {
  width: 100%; height: 46px; border-radius: 6px; background: #be1737; color: #fff;
  font-size: 14.5px; font-weight: 600; letter-spacing: 2px; border: none; cursor: pointer;
  margin-top: 6px; transition: background .15s;
}
.lp-btn:hover { background: #a5122f; }
.lp-row { display: flex; justify-content: space-between; margin-top: 16px; }
.lp-link { font-size: 12.5px; color: #be1737; cursor: pointer; text-decoration: none; }
.lp-link.grey { color: #a6a6ac; }
.lp-link:hover { text-decoration: underline; }
.login-msg { margin-top: 14px; font-size: 12.5px; color: #be1737; min-height: 18px; letter-spacing: .3px; }
.login-msg.ok { color: #12855f; }

@media (max-width: 960px) {
  .login { flex-direction: column; }
  .login-hero { width: 100%; flex: none; height: auto; padding: 34px 26px; }
  .lh-brand { margin-bottom: 22px; }
  .lh-title { font-size: 22px; }
  .lh-desc, .lh-feats, .lh-foot { display: none; }
  .login-panel { padding: 34px 26px; }
}

/* ================= 登录页 v3：Apple 式极简（红 / 黑 / 白） ================= */
.login {
  position: fixed; inset: 0; background: #f5f5f7; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 48px 20px;
}
.lg-wrap { width: 100%; max-width: 400px; text-align: center; }
.lg-brand { margin-bottom: 34px; }
.lg-logo {
  width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff;
  padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
  margin-bottom: 18px;
}
.lg-name { font-size: 15px; font-weight: 600; color: #1d1d1f; letter-spacing: 3px; }
.lg-sub { font-size: 12px; color: #86868b; margin-top: 7px; letter-spacing: 1.5px; }
.lg-card {
  background: #fff; border-radius: 20px; padding: 34px 34px 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.06);
  text-align: left;
}
.lp-tabs { display: flex; gap: 26px; margin-bottom: 26px; }
.lp-tabs a {
  font-size: 13px; color: #86868b; text-decoration: none; padding-bottom: 10px;
  border-bottom: 1.5px solid transparent; cursor: pointer; letter-spacing: .5px;
  transition: color .2s, border-color .2s;
}
.lp-tabs a:hover { color: #1d1d1f; }
.lp-tabs a.on { color: #1d1d1f; font-weight: 600; border-bottom-color: #be1737; }
.lp-pane .fld { margin-bottom: 12px; }
.lp-input {
  width: 100%; height: 48px; border: 1px solid #d2d2d7; border-radius: 12px;
  padding: 0 16px; font-size: 15px; color: #1d1d1f; background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.lp-input::placeholder { color: #a1a1a6; }
.lp-input:focus {
  outline: none; border-color: #be1737;
  box-shadow: 0 0 0 4px rgba(190,23,55,.10);
}
.lp-btn {
  width: 100%; height: 48px; border-radius: 12px; background: #be1737; color: #fff;
  font-size: 14.5px; font-weight: 500; letter-spacing: 4px; border: none; cursor: pointer;
  margin-top: 10px; transition: background .2s, transform .06s;
}
.lp-btn:hover { background: #a5122f; }
.lp-btn:active { transform: scale(.995); }
.lp-row { display: flex; justify-content: space-between; margin-top: 18px; }
.lp-link { font-size: 12.5px; color: #be1737; cursor: pointer; text-decoration: none; }
.lp-link.grey { color: #86868b; }
.lp-link:hover { opacity: .75; }
.login-msg { margin-top: 14px; font-size: 12.5px; color: #be1737; min-height: 17px; letter-spacing: .3px; }
.login-msg.ok { color: #12855f; }
.lg-foot { margin-top: 30px; font-size: 11px; color: #a1a1a6; letter-spacing: 1.6px; }

.qr-img {
  width: 190px; height: 190px; margin: 4px auto 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid #e8e8ed; border-radius: 16px; background: #fff;
  color: #a1a1a6; font-size: 12.5px; text-align: center; padding: 6px;
}
.qr-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.qr-code {
  text-align: center; margin: 14px 0 2px;
  font: 600 20px/1.4 ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 6px; color: #1d1d1f; min-height: 26px;
}
.qr-tip { text-align: center; font-size: 12px; color: #86868b; line-height: 1.8; }

@media (max-width: 480px) {
  .login { padding: 32px 16px; align-items: flex-start; }
  .lg-card { padding: 26px 22px 22px; border-radius: 18px; }
  .lg-brand { margin-bottom: 26px; }
}

/* 可点击的 KPI 卡片 */
.kpi.clickable { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.kpi.clickable:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.tg-amt { width: 120px; height: 30px; border: 1px solid #e3e3e6; border-radius: 8px;
  padding: 0 8px; font-size: 12.5px; text-align: right; }
.tg-amt:focus { outline: none; border-color: #be1737; }

/* ================= 顶栏 logo + KPI 进度条 ================= */
.top-brand { display: flex; align-items: center; gap: 9px; }
.top-logo {
  width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px;
}

.kpis { gap: 14px; margin-bottom: 16px; }
.kpi {
  border-radius: 14px; padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 118px;
}
.kpi .k { font-size: 12.5px; color: rgba(255,255,255,.62); display: flex; align-items: center; }
.kpi .k-right { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 8px; }
.kpi.light .k { color: var(--muted); }
.kpi.light .v { color: var(--ink); }
.kpi.light .s { color: var(--muted); }

/* 进度条 */
.kpi .pg {
  margin-top: 12px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.14); overflow: hidden;
}
.kpi .pg i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ff8aa0 0%, #be1737 100%);
  transition: width .45s ease;
}
.kpi.light .pg { background: #ededf0; }
.kpi.light .pg i { background: linear-gradient(90deg, #f0b400, #be1737); }

/* 目标卡：淡淡一圈品牌色描边，跟其他卡区分 */
.kpi.accent { box-shadow: inset 0 0 0 1px rgba(190,23,55,.55); }
.kpi.accent.clickable:hover { box-shadow: inset 0 0 0 1px rgba(190,23,55,.9), 0 10px 24px rgba(0,0,0,.16); }

/* 目标卡：完成率放大做主角 */
.kpi .s .hit {
  display: inline-block; font-size: 19px; font-weight: 800; letter-spacing: -.2px;
  color: #ffb3c0; margin-right: 10px; font-variant-numeric: tabular-nums;
}
.kpi.accent .pg { height: 9px; margin-top: 14px; }
.kpi.accent .v { margin-top: 6px; }
.kpi .s { line-height: 1.5; }

/* 进度条 + 小牛 logo 动画 */
.kpi .pg { position: relative; height: 9px; margin-top: 14px; background: transparent; overflow: visible; }
.kpi .pg .track {
  display: block; height: 9px; border-radius: 999px;
  background: rgba(255,255,255,.14); overflow: hidden;
}
.kpi .pg .track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ff8aa0 0%, #be1737 100%);
  transition: width .6s cubic-bezier(.22,.61,.36,1);
}
.kpi.light .pg .track { background: #ededf0; }
.kpi.light .pg .track i { background: linear-gradient(90deg, #f0b400, #be1737); }

.kpi .pg .cow {
  position: absolute; bottom: 5px; width: 22px; height: 22px; margin-left: 0;
  transform: translateX(-50%); border-radius: 50%; background: #fff; padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28); object-fit: contain;
  transition: left .6s cubic-bezier(.22,.61,.36,1);
  animation: cowBob 1.8s ease-in-out infinite;
  will-change: transform;
}
@keyframes cowBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  50%      { transform: translateX(-50%) translateY(-3px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .kpi .pg .cow { animation: none; }
}

/* 无权限提示 */
.noperm {
  max-width: 460px; margin: 120px auto; text-align: center; padding: 40px 28px;
  background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.06);
}
.noperm.hide { display: none; }
.np-icon { font-size: 40px; line-height: 1; }
.np-t { font-size: 18px; font-weight: 700; color: #141414; margin: 16px 0 10px; }
.np-s { font-size: 13px; color: #86868b; line-height: 1.75; margin-bottom: 22px; }
