/* AISPAX 空间智能 - 统一品牌样式 v5（绿米绿主题，客户页 / 服务商页 / 调试页共用） */
:root {
  --navy: #00A67E;
  --navy-2: #008E6B;
  --gold: #35C7A0;
  --bg: #F4F7F6;
  --card: #FFFFFF;
  --line: #E7EEEB;
  --text: #1F2329;
  --muted: #8A93A6;
  --ok: #22A45D;
  --err: #C0392B;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(0, 166, 126, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.app { max-width: 1120px; margin: 0 auto; min-height: 100vh; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center; letter-spacing: .5px;
}
.brand-sub { font-size: 13px; color: var(--muted); }
.brand.small .brand-logo { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
.brand.small .brand-sub { font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
#user-name { font-size: 13px; color: var(--muted); }

.content { padding: 16px; }
.head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.head-row h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: .3px; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: 12px; padding: 10px 18px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: transform .08s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.btn.primary:hover { opacity: .92; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: #FBEAEA; color: var(--err); }

/* ---------- 登录 ---------- */
#view-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  width: 100%; max-width: 420px; margin: 0 auto; background: var(--card); border-radius: 24px; padding: 32px 26px;
  box-shadow: var(--shadow);
}
.brand { justify-content: center; margin-bottom: 6px; }
.brand .brand-logo { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
.brand .brand-sub { font-size: 15px; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; gap: 8px; margin: 20px 0 4px; }
.tab {
  flex: 1; padding: 10px; border: none; background: var(--bg); border-radius: 10px;
  font-size: 14px; color: var(--muted); cursor: pointer; font-weight: 600;
}
.tab.active { background: var(--navy); color: #fff; }
.modes { display: flex; gap: 14px; margin: 12px 0 16px; }
.mode { border: none; background: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 2px; }
.mode.active { color: var(--navy); font-weight: 700; border-bottom: 2px solid var(--gold); }
.form label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.form input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; outline: none; transition: border .2s; background: #fff;
}
.form input:focus { border-color: var(--navy-2); }
.otp-row { display: flex; gap: 8px; }
.otp-row input { flex: 1; }
.otp-row .btn { white-space: nowrap; }
.form .btn.primary { width: 100%; margin-top: 18px; padding: 13px; font-size: 15px; }
.msg { font-size: 13px; margin-top: 12px; min-height: 18px; }
.msg.code-hint { color: var(--gold); background: #FBF4E6; border-radius: 8px; padding: 8px 10px; }
.msg.err { color: var(--err); }

/* ---------- 首页：我的空间 ---------- */
.welcome { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 22px 20px; margin-bottom: 16px; }
.welcome .hi { font-size: 19px; font-weight: 800; }
.welcome .sub { font-size: 13px; opacity: .75; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; cursor: pointer; transition: transform .1s, box-shadow .2s;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.card .name { font-size: 16px; font-weight: 700; }
.card .sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.card.empty { cursor: default; color: var(--muted); font-size: 13px; text-align: center; padding: 26px 16px; }
.card .pill {
  display: inline-block; margin-top: 10px; font-size: 11px; color: var(--navy);
  background: #E6F7F2; border-radius: 20px; padding: 4px 10px; font-weight: 600;
}

/* ---------- 场景卡 ---------- */
.scene-card {
  border-radius: var(--radius); padding: 18px 16px; color: #fff; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(135deg, #25B389, #00A67E); box-shadow: var(--shadow);
}
.scene-card .d-name { font-size: 15px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.scene-card .d-state { font-size: 12px; opacity: .8; margin-top: 3px; }
.scene-card .icon { font-size: 26px; margin-right: 10px; }
.scene-btn {
  border: none; border-radius: 20px; padding: 9px 20px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.92); color: var(--navy); cursor: pointer; white-space: nowrap;
}
.scene-btn:disabled { opacity: .5; cursor: not-allowed; }
.section-title { font-size: 15px; font-weight: 700; margin: 20px 0 10px; display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--gold); display: inline-block; }

/* ---------- 设备卡 ---------- */
.group-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 6px 0 8px; padding-left: 2px; grid-column: 1 / -1; }
.grow { flex: 1; min-width: 0; }
.device-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 14px; display: flex; align-items: center; gap: 12px;
}
.device-card .d-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: #EEF2F9;
}
.device-card .d-icon.on { background: #E7F3EC; }
.device-card .d-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-card .d-state { font-size: 12px; color: var(--muted); margin-top: 2px; }
.device-card .d-state.on { color: var(--ok); font-weight: 600; }
.switch {
  width: 46px; height: 26px; border-radius: 14px; border: none; position: relative;
  background: #D9DEE8; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: left .2s;
}
.switch.on { background: var(--ok); }
.switch.on::after { left: 23px; }
.switch:disabled { opacity: .5; }

/* ---------- 芯片 / 状态 ---------- */
.chip {
  font-size: 12px; font-weight: 600; border-radius: 20px; padding: 5px 12px;
  background: #E6F7F2; color: var(--navy);
}
.chip.ok { background: #E7F3EC; color: var(--ok); }
.chip.err { background: #FBEAEA; color: var(--err); }
.meta-line { font-size: 13px; color: var(--muted); margin: -8px 0 4px; }

/* ---------- 面板（服务商表单） ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-top: 14px; box-shadow: var(--shadow);
}
.panel h2 { font-size: 16px; margin: 0 0 6px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-form label:first-child, .grid-form .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; }
.form-actions .btn { flex: 1; }

/* ---------- 服务商卡片 ---------- */
.btn.detail { background: #E6F7F2; color: var(--navy); }
.btn.ghost.del:hover { background: #FBEAEA; color: var(--err); border-color: #F3D3D0; }

/* ---------- 项目卡片状态徽标 ---------- */
.card .status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.card .stat {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  border-radius: 20px; padding: 4px 10px;
}
.card .stat.on { background: #E6F7F2; color: var(--navy); }
.card .stat.off { background: #EEF2F4; color: var(--muted); }

/* ===== AISPAX APP 模拟器（app.html）===== */
.app-shell {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column;
}
.app-top {
  position: sticky; top: 0; z-index: 10; background: linear-gradient(135deg, #00A67E, #008E6B);
  color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.app-top .brand-name { font-weight: 800; font-size: 16px; flex: 1; }
.app-top select {
  background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 8px;
  padding: 6px 8px; font-size: 12px; max-width: 150px; outline: none;
}
.app-top select option { color: #1F2329; }
.app-top .btn { color: #fff; border-color: rgba(255,255,255,.4); }
.app-main { flex: 1; padding: 14px 14px 78px; overflow: auto; }
.app-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--line); display: flex; z-index: 20;
}
.app-tabbar button {
  flex: 1; border: none; background: none; padding: 8px 0 7px; font-size: 11px;
  color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.app-tabbar button.active { color: var(--navy); font-weight: 700; }
.app-tabbar .tb-icon { font-size: 18px; line-height: 1; }

.app-welcome {
  background: linear-gradient(135deg, #00A67E, #008E6B); color: #fff; border-radius: 16px;
  padding: 20px; margin-bottom: 14px;
}
.app-welcome .hi { font-size: 18px; font-weight: 800; }
.app-welcome .sub { font-size: 12px; opacity: .78; margin-top: 4px; }
.app-sec-title { font-size: 15px; font-weight: 700; margin: 16px 0 9px; }
.app-scene {
  border-radius: 14px; padding: 15px; color: #fff; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; margin-bottom: 10px;
  background: linear-gradient(135deg, #25B389, #00A67E);
}
.app-scene .sc-name { font-size: 15px; font-weight: 700; }
.app-scene .sc-state { font-size: 12px; opacity: .82; margin-top: 2px; }
.app-scene .sc-run {
  border: none; border-radius: 20px; padding: 8px 18px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.92); color: var(--navy); cursor: pointer; white-space: nowrap;
}
.app-scene .sc-run:disabled { opacity: .5; cursor: not-allowed; }

/* 产品卡 */
.app-device {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 9px; overflow: hidden;
}
.app-device .dev-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.app-device .dev-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bg);
}
.app-device .dev-icon.on { background: #E6F7F2; }
.app-device .dev-name { font-size: 14px; font-weight: 700; color: var(--text); }
.app-device .dev-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.app-device .dev-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; border-top: 1px solid #F0F2F4;
}
.app-device .dev-row .dr-ico { width: 28px; text-align: center; font-size: 15px; }
.app-device .dev-row .dr-name { flex: 1; font-size: 13px; color: var(--text); }
.app-device .dev-row .dr-state { font-size: 12px; color: var(--muted); }
.app-device .dev-row .dr-state.on { color: var(--ok); font-weight: 600; }
.app-device .dev-expand {
  text-align: center; padding: 9px; font-size: 12px; font-weight: 600; color: var(--navy);
  cursor: pointer; border-top: 1px solid #F0F2F4;
}

/* 控制面板 sheet */
.app-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; display: none;
}
.app-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: #fff;
  border-radius: 20px 20px 0 0; padding: 16px 18px 22px; max-width: 480px; margin: 0 auto;
  transform: translateY(105%); transition: transform .22s ease;
}
.app-sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: #E4E8EC; margin: 0 auto 14px; }
.sheet-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; text-align: center; }
.sheet-switch-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-label { font-size: 13px; font-weight: 600; color: var(--text); }
.sheet-slider { width: 100%; margin: 4px 0 8px; }
.sheet-slider input[type="range"] { width: 100%; accent-color: var(--navy); }
.sheet-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-bar .sb-label { font-size: 12px; color: var(--muted); width: 40px; }
.sheet-bar .sb-val { font-size: 12px; color: var(--navy); font-weight: 700; width: 40px; text-align: right; }
.sheet-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 0 4px; }

/* HomeKit 风格设备卡 + 面板 */
.hk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hk-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px 14px;
  text-align: center; cursor: pointer; transition: transform .08s ease;
}
.hk-card:active { transform: scale(.97); }
.hk-icon {
  width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--bg);
}
.hk-icon.on { background: #E6F7F2; }
.hk-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-state { font-size: 11px; color: var(--muted); margin-top: 3px; }
.hk-state.on { color: var(--ok); font-weight: 600; }
.hk-sheet-icon {
  width: 76px; height: 76px; margin: 4px auto 12px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--bg);
}
.hk-sheet-icon.on { background: #E6F7F2; }
.sheet-mode { margin-top: 10px; border-top: 1px solid #F0F2F4; padding-top: 8px; }
.sheet-rows { margin-top: 6px; }
.app-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.app-cats::-webkit-scrollbar { display: none; }
.app-cat {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px;
  font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.app-cat.active { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }

/* ===== 服务商工作台 v7：统计条 / 搜索 / 新卡片 ===== */
.wb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.wb-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(31, 35, 41, .03);
}
.wb-stat .n { display: block; font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.wb-stat .n.warn { color: var(--err); }
.wb-stat .n.muted { color: var(--muted); }
.wb-stat .l { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

.wb-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 210px; display: flex; align-items: center; }
.search-box .s-ico { position: absolute; left: 13px; display: flex; pointer-events: none; }
.search-box input {
  width: 100%; padding: 11px 14px 11px 38px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 14px; outline: none; background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(0, 166, 126, .12); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-box input::placeholder { color: #A9B2BE; }
.filter-chips { display: flex; gap: 6px; }
.fchip {
  border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 20px;
  padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.fchip:hover { border-color: #CFE5DE; color: var(--navy-2); }
.fchip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.search-hint { font-size: 12.5px; color: var(--muted); margin: 0 2px 12px; min-height: 16px; }

/* 新卡片 */
#project-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { position: relative; padding: 18px 18px; }
.card-top { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #A7B3BE, #7E8C97);
}
.avatar.on { background: linear-gradient(135deg, #25B389, #00A67E); }
.card-title { flex: 1; min-width: 0; }
.card .name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #C7CFD8; flex-shrink: 0; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 164, 93, .13); }

.card .info { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.info-line { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.info-line .k { color: var(--muted); width: 30px; flex-shrink: 0; }
.info-line .v { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-line .v.mono { font-family: Consolas, Menlo, monospace; letter-spacing: .2px; }

.card-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }

@media (max-width: 640px) {
  .wb-stats { grid-template-columns: repeat(2, 1fr); }
  .wb-toolbar { flex-direction: column; align-items: stretch; }
  .filter-chips { justify-content: flex-start; }
}


/* ===== 语音增值服务面板（/service）===== */
.tp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-head h2 { margin: 0; font-size: 16px; }
.tp-tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tp-tab {
  position: relative; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 20px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tp-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tp-dot {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--err); color: #fff; font-size: 11px;
  text-align: center; margin-left: 5px; font-weight: 700;
}
.tp-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tp-stat { background: #F7FBFA; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.tp-stat .n { display: block; font-size: 18px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.tp-stat .l { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.tp-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 880px; }
.tp-table thead th {
  background: #F7FBFA; color: var(--muted); font-weight: 700; font-size: 12px;
  text-align: left; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.tp-table tbody td { padding: 11px 12px; border-bottom: 1px solid #F1F5F3; vertical-align: middle; }
.tp-table tbody tr:last-child td { border-bottom: none; }
.tp-table tbody tr:hover { background: #FBFDFC; }
.tp-pname { font-weight: 700; font-size: 13.5px; }
.tp-psub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tp-muted { font-size: 12px; color: var(--muted); }
.tp-warn { color: #EF6C00; font-weight: 700; }
.tp-amount { font-weight: 700; color: var(--navy); }
.tp-order-no { cursor: pointer; letter-spacing: .3px; }
.tp-order-no:hover { color: var(--navy); text-decoration: underline; }

.tp-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 20px;
  padding: 4px 10px; background: #EEF2F4; color: var(--muted);
}
.tp-tag.basic { background: #EEF2F4; color: var(--muted); }
.tp-tag.smart { background: #E6F7F2; color: var(--navy); }
.tp-tag.premium { background: #FFF2DC; color: #C77700; }
.tp-tag.warn { background: #FDECEA; color: var(--err); }
.tp-tag.ok { background: #E6F7F2; color: var(--ok); }

.tp-bar { height: 5px; border-radius: 3px; background: #EDF1EF; overflow: hidden; width: 122px; }
.tp-bar i { display: block; height: 100%; border-radius: 3px; }
.tp-usage { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; white-space: nowrap; }

.tp-grant-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tp-sel, .tp-months {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 9px;
  font-size: 12.5px; background: #fff; color: var(--text); outline: none;
}
.tp-months { width: 64px; }

.tp-plan { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 11px; background: #fff; }
.tp-plan.smart { border-color: #CFE9E1; }
.tp-plan.premium { border-color: #F3E2C4; background: #FFFDF8; }
.tp-plan-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tp-plan-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 12px; margin-top: 8px; }
.tp-plan-fields label { display: block; font-size: 11.5px; color: var(--muted); }
.tp-plan-fields label.wide { grid-column: 1 / -1; }
.tp-plan-fields input {
  width: 100%; margin-top: 4px; padding: 9px 11px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 13px; outline: none; background: #fff; color: var(--text);
}
.tp-plan-fields input:focus { border-color: var(--navy-2); }

.card-tier { margin-left: 6px; font-size: 10.5px; padding: 2px 7px; }

@media (max-width: 640px) {
  .tp-plan-fields { grid-template-columns: 1fr; }
  .tp-stats { grid-template-columns: repeat(2, 1fr); }
  .tp-head { align-items: flex-start; }
}


/* ===== 项目设置页（/service 二级页：首页只留总览 + 项目列表）===== */
.card-link { cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 45, 38, .10); border-color: #CFE5DE; }
.card-go { font-size: 18px; color: #B9C4CC; margin-left: 4px; }
.card-foot {
  display: flex; align-items: center; gap: 9px; margin-top: 13px;
  padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap;
}
.pj-hint { font-size: 11.5px; color: var(--muted); }

.pj-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 0 0 14px;
}
.pj-head-main h1 { margin: 0; font-size: 21px; }
.pj-head-sub {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 7px; font-size: 12.5px; color: var(--muted);
}
.pj-head-sub .mono { font-family: Consolas, Menlo, monospace; }
.pj-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.pj-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 17px; }
.pj-card.pj-wide { grid-column: 1 / -1; }
.pj-card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--text); }
.pj-sub-h { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

.pj-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.pj-row {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 0;
  font-size: 12.8px; border-bottom: 1px solid #F4F7F6;
}
.pj-row:last-child { border-bottom: none; }
.pj-row .k { color: var(--muted); width: 82px; flex-shrink: 0; }
.pj-row .v { color: var(--text); flex: 1; min-width: 0; word-break: break-all; }
.pj-row .v.mono { font-family: Consolas, Menlo, monospace; }
.pj-row .v.ok { color: var(--ok); font-weight: 600; }
.pj-row .v.warn { color: var(--err); font-weight: 600; }
.pj-row .v.muted { color: var(--muted); }

.pj-note { font-size: 12px; line-height: 1.75; color: var(--muted); margin: 8px 0 2px; }
.pj-warn { color: #EF6C00; font-weight: 700; }
.pj-link { color: var(--navy); text-decoration: none; word-break: break-all; }
.pj-link:hover { text-decoration: underline; }

.pj-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pj-field { margin-top: 10px; }
.pj-field label { display: block; font-size: 11.5px; color: var(--muted); }
.pj-field input {
  width: 100%; margin-top: 5px; padding: 9px 11px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 13px; outline: none; background: #fff; color: var(--text);
}
.pj-field input:focus { border-color: var(--navy-2); }
.pj-field .btn { margin-top: 8px; }

.pj-pre {
  white-space: pre-wrap; background: #F6F6F8; padding: 12px; border-radius: 10px;
  font-family: Consolas, Menlo, monospace; font-size: 12.2px; line-height: 1.7;
  margin: 8px 0 0; word-break: break-all;
}
.pj-empty { font-size: 12.5px; color: var(--muted); padding: 14px 2px; }

.pj-ord-head, .pj-ord {
  display: grid; grid-template-columns: 130px 1fr 90px 84px 200px;
  gap: 10px; align-items: center; font-size: 12.5px;
}
.pj-ord-head {
  color: var(--muted); font-weight: 700; font-size: 11.5px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.pj-ord { padding: 9px 0; border-bottom: 1px solid #F4F7F6; }
.pj-ord:last-child { border-bottom: none; }
.pj-ord-time { font-family: Consolas, Menlo, monospace; color: var(--muted); font-size: 12px; }
.pj-amount { font-weight: 700; color: var(--navy); }
.pj-ord-act { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .pj-grid { grid-template-columns: 1fr; }
  .pj-head { flex-direction: column; }
  .pj-row .k { width: 68px; }
  .pj-ord-head { display: none; }
  .pj-ord { grid-template-columns: 1fr 1fr; gap: 6px; }
  .pj-ord-time { grid-column: 1 / -1; }
  .pj-ord-act { grid-column: 1 / -1; }
}
