/* ============================================================
 * 星火集 —— 样式（浅色主题）
 * ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2b7fff;
  --primary-d: #1f66db;
  --primary-l: #eaf2ff;
  --green: #00b578;
  --green-l: #e6f8f1;
  --orange: #ff8f1f;
  --orange-l: #fff4e6;
  --purple: #7c5cff;
  --purple-l: #f0ecff;
  --red: #f5453b;
  --red-l: #ffeceb;
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #1f2733;
  --text-2: #5a6474;
  --text-3: #98a2b3;
  --border: #e8ecf2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .16);

  /* —— 星火集 品牌色：夜蓝为底，金橙火红为星火 —— */
  --night-1: #16233f;
  --night-2: #101a30;
  --night-3: #0d1730;
  --spark-1: #ffcb45;
  --spark-2: #ff8f1f;
  --spark-3: #f5453b;
  --brand-grad: linear-gradient(100deg, #ffcb45 0%, #ff8f1f 52%, #f5453b 100%);
  --brand-grad-soft: linear-gradient(100deg, #ffd76a 0%, #ffa640 55%, #ff6a55 100%);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
a { color: var(--primary); text-decoration: none; }

/* ---------------- 登录页（星火集 品牌门面） ---------------- */
.brand-gradient-text {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 24px;
  background:
    radial-gradient(880px 520px at 84% -12%, rgba(43, 127, 255, .26), transparent 62%),
    radial-gradient(820px 560px at 4% 106%, rgba(255, 143, 31, .30), transparent 64%),
    radial-gradient(560px 420px at 98% 92%, rgba(245, 69, 59, .17), transparent 62%),
    linear-gradient(158deg, #101c36 0%, #0b1428 52%, #070d1a 100%);
}
/* 夜空里若隐若现的星火 */
.lw-stars { position: absolute; inset: 0; pointer-events: none; }
.lw-stars span {
  position: absolute; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: #ffd98a; box-shadow: 0 0 9px 3px rgba(255, 190, 70, .5);
  animation: sparkTwinkle 4.2s ease-in-out infinite; animation-delay: var(--d, 0s);
}
@keyframes sparkTwinkle {
  0%, 100% { opacity: .18; transform: scale(.7); }
  50% { opacity: .95; transform: scale(1.25); }
}
.login-card {
  position: relative; width: 920px; max-width: 100%; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 100px -28px rgba(0, 0, 0, .72), 0 0 0 1px rgba(255, 255, 255, .07); display: flex;
}
.login-left {
  position: relative; overflow: hidden; width: 362px; padding: 38px 34px 30px; color: #fff;
  background: linear-gradient(180deg, #17253f 0%, #101a30 60%, #0c1426 100%);
  display: flex; flex-direction: column;
}
.login-left::before {   /* 星火暖光 */
  content: ''; position: absolute; left: -80px; bottom: -150px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 31, .5), rgba(255, 143, 31, 0) 68%);
  pointer-events: none;
}
.login-left::after {    /* 顶部冷光，压住夜空层次 */
  content: ''; position: absolute; right: -70px; top: -110px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 127, 255, .32), rgba(43, 127, 255, 0) 70%);
  pointer-events: none;
}
.ll-glow {
  position: absolute; right: 22px; top: 14px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 203, 69, .30), rgba(255, 203, 69, 0) 70%);
  pointer-events: none;
}
.ll-spark {
  position: absolute; right: 30px; top: 26px; color: #ffcb45; opacity: .85;
  animation: sparkFloat 3.6s ease-in-out infinite;
}
@keyframes sparkFloat {
  0%, 100% { transform: translateY(0) scale(.9); opacity: .45; }
  50% { transform: translateY(-5px) scale(1.12); opacity: .95; }
}
.ll-brand { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.ll-mark { margin-bottom: 13px; filter: drop-shadow(0 6px 16px rgba(255, 143, 31, .34)); }
.ll-word {
  font-size: 27px; font-weight: 800; letter-spacing: 4px; line-height: 1.2;
  background: linear-gradient(180deg, #ffffff 20%, #ffdcae 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.ll-slogan { font-size: 13.5px; font-weight: 700; letter-spacing: 1.6px; margin-top: 7px; }
.ll-intro {
  position: relative; font-size: 12.5px; color: #aebfdd; line-height: 2.05; margin: 18px 0 20px;
  padding-left: 12px; border-left: 2px solid rgba(255, 143, 31, .5);
}
.ll-feats { position: relative; }
.login-feat { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 12px; }
.login-feat .dot {
  width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: none;
  background: var(--brand-grad); box-shadow: 0 0 7px 2px rgba(255, 143, 31, .38);
}
.login-feat span { font-size: 11.5px; color: #c2d2e9; line-height: 1.7; }
/* 左下角默认价格：半透明玻璃小胶囊 */
.ll-foot {
  position: relative; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 8px 13px; border-radius: 9px; font-size: 11px; color: #aebfdd;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(4px);
}
.ll-foot b { color: #ffd98a; font-weight: 700; }
.llf-sep { width: 1px; height: 10px; background: rgba(255, 255, 255, .18); }
.login-right { flex: 1; padding: 40px 46px 42px; display: flex; flex-direction: column; justify-content: center; }
.lr-head { text-align: center; margin-bottom: 22px; }
.lr-mark { display: flex; justify-content: center; margin-bottom: 11px; filter: drop-shadow(0 8px 18px rgba(255, 143, 31, .22)); }
.login-right h2 { font-size: 18px; font-weight: 700; letter-spacing: .6px; }
/* 欢迎语：左对齐大字 + 弱化副句 */
.lr-welcome { margin: 0 0 22px; line-height: 1.5; }
.lr-welcome b { display: block; font-size: 21px; font-weight: 800; color: #1f2733; letter-spacing: .5px; }
.lr-welcome span { display: block; margin-top: 5px; font-size: 12.5px; color: var(--text-3); }
.lr-sub { font-size: 11.5px; color: var(--text-3); letter-spacing: 1.5px; margin-top: 4px; }
/* 窄屏（≤1080px）左侧品牌栏会隐藏，这里补上 slogan 保证品牌信息不丢 */
.lr-slogan { display: none; font-size: 12.5px; font-weight: 700; letter-spacing: 1.4px; margin-top: 7px; }
.login-right .hint { font-size: 12px; color: var(--text-3); margin-bottom: 20px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.role-item {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 12px; cursor: pointer;
  text-align: center; transition: all .18s;
}
.role-item:hover { border-color: #ffd9ad; background: #fffbf5; }
.role-item.active { border-color: var(--spark-2); background: #fff7ec; box-shadow: 0 0 0 3px rgba(255, 143, 31, .12); }
.role-item .ri-ico { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.role-item .ri-t { font-size: 13px; font-weight: 600; }
.role-item .ri-d { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.lr-note { margin-top: 18px; font-size: 11.5px; color: #98a2b3; line-height: 1.85; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.login-right .form-row input[type="text"],
.login-right .form-row input[type="password"] {
  width: 100%; padding: 11px 14px; border-radius: 9px; font-size: 13.5px;
  border: 1.5px solid var(--border); background: #fbfcfe; transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-right .form-row input[type="text"]:focus,
.login-right .form-row input[type="password"]:focus {
  border-color: var(--spark-2, #ff8f1f); background: #fff; box-shadow: 0 0 0 3px rgba(255, 143, 31, .13);
}
.login-right .btn-brand {
  width: 100%; margin-top: 12px; padding: 12px; font-size: 14px; letter-spacing: 2px;
  border-radius: 9px; box-shadow: 0 10px 24px -8px rgba(245, 105, 40, .55);
}

/* ---------------- 通用控件 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 12.5px;
  color: var(--text-2); transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #c8d5e8; color: var(--text); background: #fafbfd; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }
/* 品牌主按钮：星火渐变（仅用于登录 / 品牌入口，数据操作仍走语义色蓝） */
.btn-brand {
  background: var(--brand-grad); border: none; color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgba(255, 122, 24, .62);
}
.btn-brand:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 10px 24px -8px rgba(255, 122, 24, .72); }
.btn-danger { color: var(--red); border-color: #ffd9d6; background: #fff; }
.btn-danger:hover { background: var(--red-l); border-color: #ffbdba; color: var(--red); }
.btn-sm { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f2f5fa; }

input[type=text], input[type=number], input[type=date], input[type=time], select, textarea {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 12.5px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 127, 255, .12); }
select { cursor: pointer; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px;
  font-size: 11.5px; line-height: 19px; white-space: nowrap;
}
.tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-green { color: #00915f; background: var(--green-l); }
.tag-gray { color: #7a8699; background: #f0f2f6; }
.tag-blue { color: #1f66db; background: var(--primary-l); }
.tag-orange { color: #c96a00; background: var(--orange-l); }
.tag-purple { color: #5b3fe0; background: var(--purple-l); }
.tag-red { color: #d92d24; background: var(--red-l); }
.tag-plain::before { display: none; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; height: 100%; }
.sidebar {
  width: 216px; flex: none; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #16233f 0%, #101a30 100%);
}
.sb-logo { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #fff; }
.sb-logo .lg {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  flex: none; background: radial-gradient(circle at 50% 46%, rgba(255, 143, 31, .32), rgba(255, 143, 31, 0) 72%);
}
.sb-logo .lt {
  font-size: 14.5px; font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 25%, #ffdcae 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.sb-logo .ls { font-size: 9.5px; color: #7f92b4; letter-spacing: 1.6px; }
.sb-portal { margin: 6px 14px 4px; padding: 6px 10px; border-radius: 7px; font-size: 11px; color: #9fb2d2; background: rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 6px; }
.sb-portal b { color: #fff; font-weight: 600; }
.sb-nav { flex: 1; overflow-y: auto; padding: 8px 0 16px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: #93a3bf; cursor: pointer;
  font-size: 13px; border-left: 3px solid transparent; transition: all .15s;
}
.nav-item:hover { color: #dce6f7; background: rgba(255, 255, 255, .04); }
.nav-item.active {
  color: #fff; background: linear-gradient(90deg, var(--rc-bg, rgba(43, 127, 255, .16)), rgba(255, 255, 255, 0));
  border-left-color: var(--rc, var(--primary));
}
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item.active svg { color: var(--rc, #fff); }
.nav-item .nav-badge {
  margin-left: auto; background: #f5453b; color: #fff; font-size: 10.5px; font-weight: 600;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; display: flex;
  align-items: center; justify-content: center; line-height: 1;
}
.alert-bell {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 20px;
  border: 1px solid #ffd3d0; background: #fff2f1; color: #d92d24; font-size: 12px; cursor: pointer;
  animation: bellPulse 2s ease-in-out infinite;
}
.alert-bell:hover { background: #ffe6e4; border-color: #ffb8b3; }
.alert-bell b { background: #f5453b; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 16px; }
@keyframes bellPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 69, 59, .28); }
  50% { box-shadow: 0 0 0 5px rgba(245, 69, 59, 0); }
}
.sb-foot { padding: 11px 16px 13px; font-size: 11px; color: #5f7091; border-top: 1px solid rgba(255, 255, 255, .06); }
.sb-foot .sb-slogan {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; margin-bottom: 4px;
  background: var(--brand-grad-soft); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- 各端首页：品牌欢迎条 ---------------- */
.brand-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 18px; margin-bottom: 15px; border-radius: 12px; color: #fff;
  background: linear-gradient(118deg, #17253f 0%, #121e36 56%, #0d1730 100%);
  box-shadow: 0 10px 26px -16px rgba(9, 16, 32, .72), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.brand-hero::before {   /* 星火暖光（左下） */
  content: ''; position: absolute; left: -70px; bottom: -120px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 31, .46), rgba(255, 143, 31, 0) 68%); pointer-events: none;
}
.brand-hero::after {    /* 角色色光晕（右上） */
  content: ''; position: absolute; right: -50px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--rc, #2b7fff), rgba(0, 0, 0, 0) 66%); opacity: .3; pointer-events: none;
}
.bh-mark {
  position: relative; flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: radial-gradient(circle at 50% 46%, rgba(255, 143, 31, .30), rgba(255, 143, 31, 0) 74%);
}
.bh-txt { position: relative; min-width: 0; }
.bh-line1 { display: flex; align-items: center; gap: 8px; }
.bh-word {
  font-size: 14.5px; font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 25%, #ffdcae 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.bh-role {
  font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 20px;
  border: 1px solid transparent; letter-spacing: .4px; white-space: nowrap;
}
.bh-line2 { font-size: 11.5px; color: #a3b7d6; margin-top: 3px; }
.bh-slogan {
  position: relative; margin-left: auto; font-size: 13px; font-weight: 700;
  letter-spacing: 1.4px; white-space: nowrap; filter: drop-shadow(0 0 14px rgba(255, 143, 31, .35));
}
.bh-stars { position: absolute; inset: 0; pointer-events: none; }
.bh-stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffd98a;
  box-shadow: 0 0 8px 2px rgba(255, 190, 70, .45);
  animation: sparkTwinkle 4.2s ease-in-out infinite; animation-delay: var(--d, 0s);
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; flex: none; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar .tb-title { font-size: 15px; font-weight: 600; }
.topbar .tb-crumb { font-size: 12px; color: var(--text-3); }
.topbar .spacer { flex: 1; }
.tb-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px;
  font-size: 12px; background: #f4f7fb; color: var(--text-2); border: 1px solid var(--border);
}
.tb-user { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--border); }
.tb-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; }
.tb-user .un { font-size: 12.5px; font-weight: 600; }
.tb-user .ur { font-size: 11px; color: var(--text-3); }
.content { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }

/* ---------------- 卡片 ---------------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.panel-head .fld { display: flex; align-items: center; gap: 6px; }
.panel-head .fld input[type=text] { width: 210px; height: 30px; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; font-size: 12px; outline: none; }
.panel-head .fld input[type=text]:focus { border-color: var(--blue, #2b7fff); }
.panel-head h3 { font-size: 14px; font-weight: 600; }
.panel-head .desc { font-size: 11.5px; color: var(--text-3); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card .sc-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stat-card .sc-ico { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.stat-card .sc-val { font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-card .sc-val small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-card .sc-sub { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.stat-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; opacity: .07; background: currentColor; }

/* ---------------- 工具条 ---------------- */
.toolbar { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; border-bottom: 1px solid var(--border); }
.toolbar .fld { display: flex; align-items: center; gap: 7px; }
.toolbar .fld > span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.toolbar input[type=text] { width: 158px; }
.toolbar select { min-width: 116px; }
.toolbar .spacer { flex: 1; }
.actbar { padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: 1px solid var(--border); background: #fcfdff; }
.actbar .spacer { flex: 1; }

/* ---------------- 表格 ---------------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl thead th {
  background: #f7f9fc; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12px;
}
table.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid #f2f5f9; white-space: nowrap; color: var(--text); }
table.tbl tbody tr:hover { background: #fafcff; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; }
.muted { color: var(--text-3); }
.text-c { text-align: center; }
.nowrap { white-space: nowrap; }
.ops { display: flex; gap: 4px; }
.ops a { font-size: 12px; cursor: pointer; padding: 2px 5px; border-radius: 5px; }
.ops a:hover { background: var(--primary-l); }

/* ---------------- 分页 ---------------- */
.pager { padding: 12px 18px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.pager .spacer { flex: 1; }
.pager .pg-btn { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.pager .pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager .pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager .pg-size { height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 12.5px; color: var(--text-2); cursor: pointer; outline: none; }
.pager .pg-size:focus { border-color: var(--primary); }
.tbl .chk { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); vertical-align: middle; }
.tbl td:first-child, .tbl th:first-child { text-align: center; }

/* ---------------- 账号卡片（客户端） ---------------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }
.acct-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; }
.acct-card.off { background: #fbfcfe; }
.acct-card .ac-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.acct-card .ac-av { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; flex: none; }
.acct-card .ac-nm { font-size: 13px; font-weight: 600; }
.acct-card .ac-id { font-size: 11px; color: var(--text-3); font-family: Consolas, monospace; }
.acct-card .ac-body { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin: 10px 0 12px; font-size: 12px; }
.acct-card .ac-body .k { color: var(--text-3); }
.acct-card .ac-body .v { font-weight: 600; text-align: right; }
.acct-card .ac-foot { display: flex; gap: 8px; padding-top: 11px; border-top: 1px dashed var(--border); }
.acct-card .ac-foot .btn { flex: 1; justify-content: center; }

/* ---------------- 其它 ---------------- */
.kv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; }
.kv-list .kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.kv-list .kv .k { color: var(--text-2); }
.kv-list .kv .v { font-weight: 600; }

.timeline { padding: 4px 0; }
.tl-item { display: flex; gap: 12px; padding: 9px 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 12.5px; }
.tl-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.empty { padding: 46px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty .ei { font-size: 32px; opacity: .5; margin-bottom: 8px; }

/* 余额进度 / 预警 */
.bar { height: 6px; background: #eef1f6; border-radius: 4px; overflow: hidden; min-width: 64px; }
.bar > i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.row-danger { background: #fffaf9 !important; }
.row-danger:hover { background: #fff5f4 !important; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 18px; background: #fff;
  cursor: pointer; font-size: 12.5px; color: var(--text-2); transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.renew-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px; background: #fff;
}
.renew-item.lv-overdue { border-color: #ffcdc8; background: #fffafa; }
.renew-item.lv-urgent { border-color: #ffdcd6; background: #fffcfb; }
.renew-item.lv-warn { border-color: #ffe3bd; background: #fffdfa; }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 9px; font-size: 12.5px; line-height: 1.7; }
.notice-blue { background: var(--primary-l); color: #1a4f9e; border: 1px solid #d3e4ff; }
.notice-orange { background: var(--orange-l); color: #96560a; border: 1px solid #ffe0b8; }
.notice-green { background: var(--green-l); color: #056b48; border: 1px solid #c3ecd9; }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.chart-box { width: 100%; height: 230px; }

/* ---------------- 弹窗 ---------------- */
.mask { position: fixed; inset: 0; background: rgba(15, 22, 36, .45); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 520px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45); }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; font-weight: 600; flex: 1; }
.modal-head .x { cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.modal-head .x:hover { background: #f2f5fa; color: var(--text); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
.form-grid textarea { resize: vertical; min-height: 66px; }

/* ---------------- Toast ---------------- */
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-item {
  background: #1f2733; color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 12.5px;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5); animation: tin .22s ease; display: flex; align-items: center; gap: 8px;
}
.toast-item.ok { background: #067a52; }
.toast-item.warn { background: #b5651d; }
.toast-item.err { background: #c22a21; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .login-left { display: none; }
  .login-card { width: 520px; }
  .lr-slogan { display: block; }
}

/* ============================================================
 *  手机竖屏适配
 *  说明：桌面端（宽度 > 768px）样式不变，以下规则只在手机 / 窄屏生效。
 *  侧边栏收起为抽屉（左上角 ☰ 打开），表格横向滑动，弹窗底部弹出。
 * ============================================================ */

/* 手机专用元素：桌面端一律不显示 */
.sb-mask { display: none; }
.sb-close { display: none; }
.btn-menu { display: none; }
.tb-heading { min-width: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (max-width: 768px) {

  /* ---------------- 基础 ---------------- */
  body { overflow-x: hidden; }
  body.sb-locked { overflow: hidden; }
  .layout { position: relative; overflow-x: hidden; }

  /* ---------------- 侧边栏 → 抽屉 ---------------- */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 950;
    width: 264px; max-width: 84vw;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 8px 0 34px rgba(8, 14, 26, .4);
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
  .layout.sb-open .sidebar { transform: none; }
  .sb-mask {
    display: block; position: fixed; inset: 0; z-index: 940;
    background: rgba(10, 16, 28, .52);
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .layout.sb-open .sb-mask { opacity: 1; pointer-events: auto; }

  .sb-close {
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; width: 34px; height: 34px; flex: none;
    border-radius: 9px; color: #8ea3c6; cursor: pointer;
  }
  .sb-close:active { background: rgba(255, 255, 255, .1); color: #fff; }

  .sb-nav { flex: none; padding-bottom: 8px; }
  .sb-foot { margin-top: auto; }   /* 菜单少时 slogan 贴住抽屉底部，不留空洞 */
  .nav-item { padding: 12px 18px; font-size: 14.5px; }
  .nav-item svg { width: 18px; height: 18px; }
  .sb-portal { margin: 8px 14px 6px; padding: 8px 12px; font-size: 12px; }

  /* ---------------- 顶栏 ---------------- */
  .btn-menu {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none; margin-left: -4px;
    border: none; background: transparent; color: var(--text-2);
    border-radius: 10px; cursor: pointer;
  }
  .btn-menu:active { background: #eef2f8; }
  .topbar { height: 54px; padding: 0 12px; gap: 8px; }
  .topbar .tb-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .tb-crumb { display: none; }
  .topbar .tb-chip { display: none; }
  .topbar .tb-user { padding-left: 10px; gap: 7px; }
  .topbar .tb-user .ur { display: none; }
  .topbar .tb-user .un { max-width: 84px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .topbar .tb-avatar { width: 28px; height: 28px; }
  .alert-bell { padding: 6px 9px; gap: 4px; }
  .alert-bell > span { display: none; }

  /* ---------------- 内容区 ---------------- */
  .content {
    padding: 12px 12px 30px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* ---------------- 卡片 / 面板 ---------------- */
  .panel-head { padding: 12px 13px; flex-wrap: wrap; }
  .panel-head h3 { font-size: 14px; }
  .panel-head .fld { flex: 1 1 100%; }
  .panel-head .fld input[type=text] { width: 100% !important; }
  .panel-body { padding: 13px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; margin-bottom: 12px; }
  .stat-card { padding: 13px; }
  .stat-card .sc-label { font-size: 12px; }
  .stat-card .sc-val { font-size: 23px; margin-top: 6px; }
  .stat-card .sc-sub { font-size: 11px; }
  /* 内联写死的多栏网格在窄屏下压平：页面级双栏 → 单栏，键值对列表 → 单列。
     这些是行内 style，优先级高于 class，必须用属性选择器 + !important 覆盖 */
  [style*='grid-template-columns:1.6fr 1fr'],
  [style*='grid-template-columns:1fr 1fr'] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .kv-list { grid-template-columns: 1fr !important; }

  /* ---------------- 筛选工具条 ---------------- */
  .toolbar { padding: 12px 13px; gap: 10px; }
  .toolbar .fld { flex: 1 1 calc(50% - 5px); flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
  .toolbar .fld > span { font-size: 12px; }
  .toolbar .fld input, .toolbar .fld select { width: 100% !important; min-width: 0; }
  .toolbar .spacer { display: none; }
  .actbar { padding: 10px 13px; gap: 7px; }
  .actbar .spacer { display: none; }

  /* ---------------- 表格：横向滑动 ---------------- */
  .tbl-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  table.tbl { width: auto; min-width: 100%; }
  table.tbl thead th { padding: 9px 10px; font-size: 11.5px; }
  table.tbl tbody td { padding: 9px 10px; }
  .tbl .chk { width: 18px; height: 18px; }
  .ops { gap: 2px; }
  .ops a { padding: 6px 9px; font-size: 13px; }

  /* ---------------- 分页 ---------------- */
  .pager { padding: 10px 13px; flex-wrap: wrap; gap: 7px; }
  .pager .spacer { display: none; }
  .pager .pg-btn { min-width: 32px; height: 32px; }
  .pager .pg-size { height: 32px; }

  /* ---------------- 账号卡片（客户端 / 员工端 / 渠道端） ---------------- */
  .acct-grid { grid-template-columns: 1fr; gap: 11px; }
  .acct-card { padding: 14px; }
  .acct-card .ac-foot .btn { padding: 9px 10px; }
  .chip { padding: 7px 14px; }
  .chip-row { gap: 7px; }

  /* ---------------- 其它列表 ---------------- */
  .kv-list { grid-template-columns: 1fr; gap: 0; }
  .renew-item { flex-wrap: wrap; gap: 9px; padding: 12px; }
  .chart-box { height: 200px; }

  /* ---------------- 按钮 / 输入：便于手指点按 ---------------- */
  .btn { padding: 8px 14px; }
  .btn-sm { padding: 6px 11px; }
  /* iOS 上字号 < 16px 的输入框聚焦会自动放大页面，这里统一 16px 避免跳动 */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }

  /* ---------------- 弹窗：底部弹出、全宽 ---------------- */
  .mask { padding: 0; align-items: flex-end; }
  .modal {
    width: 100% !important; max-width: 100%; max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 15px 16px; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }

  /* ---------------- Toast：移到屏幕下方 ---------------- */
  #toast { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .toast-item { font-size: 13px; padding: 10px 16px; max-width: calc(100vw - 32px); text-align: center; }

  /* ---------------- 登录页 ---------------- */
  .login-wrap { padding: 16px; align-items: flex-start; overflow-y: auto; }
  .login-card { margin-top: 3vh; width: 100%; border-radius: 14px; }
  .login-right { padding: 24px 20px 28px; }
  .lr-head { margin-bottom: 16px; }
  .login-right h2 { font-size: 17px; }
  .lr-note { font-size: 11px; line-height: 1.8; }

  /* ---------------- 品牌欢迎条 ---------------- */
  .brand-hero { padding: 12px 14px; gap: 10px; margin-bottom: 12px; border-radius: 11px; }
  .bh-mark { width: 32px; height: 32px; }
  .bh-word { font-size: 14px; letter-spacing: 1.6px; }
  .bh-slogan { margin-left: 0; flex-basis: 100%; font-size: 11.5px; letter-spacing: 1px; padding-left: 42px; }

  /* ---------------- 刘海屏安全区 ---------------- */
  @supports (padding: env(safe-area-inset-top)) {
    .topbar { height: calc(54px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
    .sidebar { padding-top: env(safe-area-inset-top); }
  }
}

/* 超窄屏（iPhone SE 等 320~375px）进一步压缩 */
@media (max-width: 400px) {
  .content { padding: 10px 10px 28px; }
  .stat-grid { gap: 8px; }
  .stat-card { padding: 11px; }
  .stat-card .sc-val { font-size: 21px; }
  .topbar { padding: 0 9px; gap: 6px; }
  .panel-head, .panel-body, .toolbar, .actbar, .pager { padding-left: 11px; padding-right: 11px; }
  .topbar .tb-user .un { max-width: 62px; }
}

