:root {
  --bg: #070a12;
  --panel: #0e1320;
  --panel-2: #121a2a;
  --line: #1b2740;
  --line-2: #24314b;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --violet: #8b5cf6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --text: #e9f0fa;
  --sub: #7c8ba3;
  --dim: #4e5b72;
  /* 底部安全区：浏览器窗口的下沿常被 Windows 任务栏压住 */
  --bottom-safe: 34px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 13px;
  overflow: hidden;
}

/* ---------------- 动态背景 ---------------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1100px 700px at 18% 12%, rgba(34, 211, 238, 0.10), transparent 62%),
    radial-gradient(1000px 640px at 86% 88%, rgba(139, 92, 246, 0.10), transparent 62%),
    linear-gradient(135deg, #070a12 0%, #0a101c 48%, #080c15 100%);
  overflow: hidden;
}

#bg::before {
  content: "";
  position: absolute;
  inset: -40%;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(120, 190, 255, 0.05) 0px,
    rgba(120, 190, 255, 0.05) 1px,
    transparent 1px,
    transparent 30px
  );
  animation: drift 40s linear infinite;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(60px, 60px); }
}

.scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 240px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0) 0%,
    rgba(34, 211, 238, 0.05) 42%,
    rgba(140, 235, 255, 0.16) 50%,
    rgba(34, 211, 238, 0.05) 58%,
    rgba(34, 211, 238, 0) 100%
  );
  animation: sweep 9s linear infinite;
}

.scan.s2 { animation-duration: 13s; animation-delay: -4s; opacity: 0.6; }

@keyframes sweep {
  0%   { top: -260px; }
  100% { top: 100vh; }
}

/* ---------------- 布局 ---------------- */
/* 整页留出底部安全区：浏览器窗口的下沿常被 Windows 任务栏压住，
   用视口高度 - 安全区 的方式，让侧栏底部那一条始终完整可见 */

#app {
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--bottom-safe));
  height: calc(100dvh - var(--bottom-safe));
  display: grid;
  grid-template-rows: 56px 1fr;
  min-height: 0;
  overflow: hidden;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: rgba(10, 15, 26, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.42);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
  color: #06121b;
  letter-spacing: 0.5px;
  flex: 0 0 auto;
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-title {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 16px; font-weight: 800;
}

.brand-title .n {
  font-family: Bahnschrift, Inter, sans-serif;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #7df3ff, #38bdf8 45%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 8px;
  letter-spacing: 2.4px;
  color: var(--dim);
  text-transform: uppercase;
}

.header-mid { flex: 1; display: flex; justify-content: center; gap: 9px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.chip.live { background: rgba(12, 32, 40, 0.9); border-color: #1b4a57; color: #7fe3ce; }
.chip.mode { background: rgba(26, 22, 48, 0.9); border-color: #332a5c; color: #c4b5fd; }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.header-right { display: flex; align-items: center; gap: 16px; }

.stat-mini { text-align: right; }
.stat-mini b {
  display: block; font-size: 16px; font-family: Bahnschrift, Inter, sans-serif;
}
.stat-mini span { font-size: 8.5px; letter-spacing: 1.2px; color: var(--dim); }
.stat-mini.cy b { color: var(--cyan); }
.stat-mini.rd b { color: var(--red); }

/* ---------------- 侧边栏 ---------------- */
/* main 必须是固定高度的网格行：1fr 会算出具体高度，
   再加 min-height:0 让子项能在里面收缩，aside 内部的滚动才成立 */
main {
  display: grid;
  grid-template-columns: 226px 1fr;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

aside {
  background: rgba(9, 14, 24, 0.72);
  border-right: 1px solid var(--line);
  /* 上右下左：底部留 20px，身份栏不再贴到窗口下沿 */
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;                 /* 间距交给各块自己控制，避免累加算错 */
  /* 关键：撑满 main 的整行高度，内部滚动而不是被内容撑高 */
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* 导航区：唯一可滚动的部分，绝不参与高度争抢 */
.side-scroll {
  flex: 1 1 auto;
  flex-shrink: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 0;
}

.side-label {
  font-size: 10px; letter-spacing: 1.6px; color: var(--dim);
  padding: 0 6px; margin: 4px 0 6px;
}

.nav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border-radius: 8px;
  color: var(--sub);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.nav:hover { background: #111b2b; color: var(--text); }

.nav.active {
  background: rgba(16, 41, 58, 0.85);
  border-color: rgba(34, 211, 238, 0.32);
  color: var(--cyan-soft);
  font-weight: 600;
}

.nav svg { width: 14px; height: 14px; flex: 0 0 auto; }

.side-divider { height: 1px; background: var(--line); margin: 12px 4px; }

.side-studio {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 7px 9px; border-radius: 7px;
  cursor: pointer; font-size: 11.5px; color: var(--text);
  transition: background 0.15s;
}

.side-studio:hover { background: #111b2b; }
.side-studio .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-studio .bal {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10.5px; color: var(--amber); flex: 0 0 auto;
}

/* 身份栏：与导航区同级的 flex 项，常驻底部，不参与滚动 */
.side-foot {
  /* 三重锁定：不许涨、不许缩、显式高度 */
  flex: 0 0 52px;
  flex-shrink: 0;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(12, 21, 36, 0.95);
  box-sizing: border-box;
  overflow: hidden;
}

.side-foot .avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #10293a;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 12px;
}

.side-foot .who-box {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.side-foot .who,
.side-foot .role {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;          /* 用固定行高，避免字体撑高被裁 */
}

.side-foot .who { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 16px; }
.side-foot .role { font-size: 10px; letter-spacing: 0.5px; color: var(--dim); line-height: 13px; }

.side-foot .logout-btn {
  flex: 0 0 auto;
  width: 46px;
  padding: 0;
  height: 26px;
  font-size: 10.5px;
  line-height: 26px;
  text-align: center;
}
/* ---------------- 内容区 ---------------- */
section {
  padding: 16px 18px 20px;
  overflow-y: auto;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 12px; gap: 12px;
}

.page-title { font-size: 19px; font-weight: 700; letter-spacing: 0.4px; }
.page-sub { font-size: 11.5px; color: var(--sub); margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #141c2c;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn:hover { background: #1b2741; border-color: var(--cyan); }

.btn.primary {
  background: linear-gradient(90deg, #38bdf8, #7c6cf8);
  border-color: transparent;
  color: #04121c;
  font-weight: 700;
}

.btn.primary:hover { filter: brightness(1.08); }

.btn.ghost { background: transparent; color: var(--sub); }

.btn.ghost:hover { background: #162032; color: var(--text); border-color: var(--line-2); }

.btn.danger { background: #22141c; border-color: #3f2230; color: #fca5a5; }

.btn.danger:hover { background: #331a24; border-color: #7f1d1d; }

.btn.sm { padding: 4px 10px; font-size: 10.5px; border-radius: 6px; }

/* HUD 卡片 */
.hud {
  position: relative;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.94), rgba(14, 19, 31, 0.92));
  border: 1px solid rgba(44, 60, 92, 0.7);
  border-radius: 14px;
  overflow: hidden;
}

.hud::before, .hud::after,
.hud > .c3, .hud > .c4 {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 1.6px solid var(--cyan);
  opacity: 0.85;
  pointer-events: none;
}

.hud::before { top: 1px; left: 1px; border-right: 0; border-bottom: 0; }
.hud::after { top: 1px; right: 1px; border-left: 0; border-bottom: 0; }
.hud > .c3 { bottom: 1px; left: 1px; border-right: 0; border-top: 0; }
.hud > .c4 { bottom: 1px; right: 1px; border-left: 0; border-top: 0; }

.hud .scanline {
  position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg,
    rgba(34, 211, 238, 0) 0%,
    rgba(34, 211, 238, 0.05) 42%,
    rgba(140, 235, 255, 0.14) 50%,
    rgba(34, 211, 238, 0.05) 58%,
    rgba(34, 211, 238, 0) 100%);
  animation: card-sweep 6s linear infinite;
  pointer-events: none;
}

@keyframes card-sweep {
  0%   { top: -130px; }
  100% { top: 100%; }
}

.hud-body { position: relative; padding: 16px; }

/* 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card .lbl {
  font-size: 10px; letter-spacing: 1.6px; color: var(--dim);
  text-transform: uppercase;
}

.stat-card .val {
  font-size: 27px; font-weight: 800;
  font-family: Bahnschrift, Inter, sans-serif;
  line-height: 1.25;
}

.stat-card .sub { font-size: 11px; color: var(--sub); }

.stat-card.c1 .val { color: var(--cyan); }
.stat-card.c2 .val { color: #a78bfa; }
.stat-card.c3 .val { color: var(--green); }
.stat-card.c4 .val { color: var(--amber); }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; flex-wrap: wrap;
}

input[type="text"], input[type="number"], input[type="password"], select {
  background: #0b1220;
  border: 1px solid #22304a;
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  min-height: 38px;
}

input:focus, select:focus { border-color: var(--cyan); }
input::placeholder { color: #3d4a60; }

select { cursor: pointer; }

.grow { flex: 1; min-width: 180px; }

/* 表格 */
.table-wrap { overflow: auto; max-height: calc(100vh - 300px - var(--bottom-safe)); }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

thead th {
  position: sticky; top: 0;
  background: #0c1421;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 2;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #16203200;
  border-bottom-color: rgba(24, 35, 56, 0.9);
  white-space: nowrap;
}

tbody tr:hover { background: rgba(20, 30, 49, 0.72); }

tbody tr.sel { background: rgba(23, 38, 63, 0.9); }

.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.5px; }

.money { font-family: "Cascadia Mono", Consolas, monospace; color: var(--amber); }
.money.in { color: var(--green); }
.money.out { color: var(--red); }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.on { background: rgba(16, 46, 36, 0.9); color: var(--green); }
.badge.off { background: rgba(51, 26, 34, 0.9); color: var(--red); }
.badge.wait { background: rgba(58, 46, 18, 0.9); color: var(--amber); }
.badge.info { background: rgba(26, 34, 51, 0.9); color: var(--sub); }

.row-actions { display: flex; gap: 5px; }

.empty {
  padding: 34px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}

/* 工作室页：左右分栏 */
.split { display: grid; grid-template-columns: 1fr 392px; gap: 12px; align-items: start; }

.detail-name { font-size: 15px; font-weight: 700; }
.detail-sub { font-size: 11.5px; color: var(--sub); margin-top: 3px; }

.balance-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(11, 26, 34, 0.9);
  border: 1px solid #1b4152;
}

.balance-box .lbl { font-size: 10px; letter-spacing: 1.4px; color: var(--dim); }
.balance-box .val {
  font-size: 25px; font-weight: 800;
  font-family: Bahnschrift, Inter, sans-serif;
  color: var(--amber);
}

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 2px;
  color: var(--cyan-soft);
  margin-bottom: 10px;
}

.sec-title .bar {
  width: 3px; height: 12px; border-radius: 2px; background: var(--cyan);
}

.totals { display: flex; gap: 16px; font-size: 11.5px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  z-index: 50;
}

.modal {
  width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  background: #080d16;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

.modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}

.modal-title { font-size: 14.5px; font-weight: 700; }

.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 13px; }

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 10.5px; letter-spacing: 1.2px; color: var(--dim);
  text-transform: uppercase;
}

.field input, .field select { width: 100%; }

.modal-foot {
  padding: 0 20px 18px;
  display: flex; justify-content: flex-end; gap: 10px;
}

.err {
  margin: 0 20px 12px;
  padding: 9px 11px;
  font-size: 11.5px;
  border-radius: 7px;
  background: rgba(51, 21, 29, 0.9);
  border: 1px solid #5a2530;
  color: #fca5a5;
}

.toast {
  position: fixed;
  bottom: 22px; left: 50%; transform: translateX(-50%);
  padding: 11px 20px;
  border-radius: 9px;
  background: rgba(11, 26, 34, 0.96);
  border: 1px solid #1b4152;
  color: #cdeff5;
  font-size: 12.5px;
  z-index: 80;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
  animation: rise 0.22s ease-out;
}

.toast.bad { background: rgba(38, 16, 22, 0.96); border-color: #5a2530; color: #fca5a5; }

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1c2740; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2a3a58; }

/* ============================ 登录门 ============================ */
.login-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(9, 14, 24, 0.94);
  border: 1px solid #24314b;
  border-radius: 16px;
  padding: 30px 28px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(34, 211, 238, 0.06);
  backdrop-filter: blur(14px);
  animation: loginIn 0.35s ease-out;
  position: relative;
}

/* 打卡弹窗右上角「退出」：退出当前登录账号 */
.checkin-logout {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-family: inherit;
  letter-spacing: 0.6px;
  color: #8a97ad;
  background: transparent;
  border: 1px solid #2a3852;
  border-radius: 7px;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}

.checkin-logout:hover {
  color: #fca5a5;
  border-color: #5a2530;
  background: rgba(90, 37, 48, 0.28);
}

.checkin-logout:active {
  background: rgba(90, 37, 48, 0.5);
}

@keyframes loginIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.login-head .brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.login-title { min-width: 0; }

.login-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #e9f0fa;
}

.login-name .n {
  background: linear-gradient(90deg, #7df3ff, #38bdf8 45%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub {
  font-size: 9px;
  letter-spacing: 2.4px;
  color: #4e5b72;
  margin-top: 3px;
}

.login-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 1.1px;
  color: #6b7a92;
  margin: 0 0 6px 2px;
}

/* 登录框里的输入：宽度撑满，高度统一，盒子模型对齐 */
#loginForm {
  display: flex;
  flex-direction: column;
}

#loginForm input[type="text"],
#loginForm input[type="password"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  font-size: 13.5px;
  line-height: 42px;
  letter-spacing: 0.4px;
  border-radius: 9px;
}

#loginForm input[type="text"] { margin-bottom: 15px; }
#loginForm input[type="password"] { margin-bottom: 4px; }

#loginForm input[type="text"]:focus,
#loginForm input[type="password"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.login-err {
  min-height: 18px;
  font-size: 11.5px;
  color: #fca5a5;
  margin: 2px 0 10px;
  line-height: 1.5;
}

.login-btn {
  width: 100%;
  height: 44px;
  font-size: 14px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 16px;
}

.login-tip {
  font-size: 10.5px;
  line-height: 1.8;
  color: #4e5b72;
  text-align: center;
  letter-spacing: 0.4px;
  border-top: 1px solid #1b2740;
  padding-top: 14px;
}

/* 身份栏文字尺寸统一由 .side-foot .who / .role 控制，
   不要在这里用 ID 选择器覆盖，否则权重更高会打架。 */

/* 窄屏登录适配 */
@media (max-width: 420px) {
  .login-card { padding: 24px 20px 20px; border-radius: 14px; }
  .login-name { font-size: 17px; }
}

/* ============================ 侧栏布局兜底 ============================
   高度链 #app(视口) → main(100%) → aside(100%)，
   中间层全部 min-height:0 + overflow:hidden，只有 .side-scroll 可滚。
   身份栏用普通 flex 项常驻底部，不用 sticky —— sticky 在矮容器里会把
   元素推出可视区，导致"没被压住却显示不全"。 */
#app > main { grid-row: 2; }
aside > .side-scroll { order: 1; }
aside > .side-foot { order: 2; }

/* 导航徽章（待审核数量） */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #7f1d1d;
  color: #fca5a5;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex: 0 0 auto;
}

/* ============================ 进度条 ============================ */
.bar-track {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 42px);
  min-width: 60px;
  height: 7px;
  border-radius: 4px;
  background: #0d1524;
  border: 1px solid #1b2740;
  overflow: hidden;
  margin-right: 6px;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 2px;
}

/* 售后页勾选框 */
.rid-chk, #chkAllRefund {
  width: 14px;
  height: 14px;
  min-height: 0;
  accent-color: #22d3ee;
  cursor: pointer;
  vertical-align: middle;
}

/* ============================ 开工打卡 ============================ */
.checkin-studio {
  font-size: 12px;
  color: #7c8ba3;
  text-align: center;
  letter-spacing: 1px;
  margin: -14px 0 22px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(16, 26, 44, 0.7);
  border: 1px solid #1b2740;
}

/* 打卡输入框：与卡片同宽，字距适中，视觉居中 */
#checkinForm {
  display: flex;
  flex-direction: column;
}

#checkinForm #checkinKey {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 56px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 10px;
  background: #0b1220;
  border: 1px solid #2b3a58;
  color: #e9f0fa;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 8px;
  text-align: center;
  text-indent: 8px;          /* 抵消末字符的字距，让整体居中 */
  text-transform: uppercase;
  transition: border-color .18s, box-shadow .18s;
}

#checkinForm #checkinKey::placeholder {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  color: #3d4a60;
  text-indent: 0;
}

#checkinForm #checkinKey:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
  outline: none;
}

/* 打卡按钮与输入框同宽同高，间距统一 */
#checkinForm .login-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  margin-bottom: 18px;
  font-size: 14px;
  letter-spacing: 4px;
  border-radius: 10px;
}

#checkinForm .login-label {
  margin-bottom: 8px;
}

/* 打卡弹窗背景更强，禁止误关 */
#checkin.login-wrap {
  background: rgba(4, 7, 12, 0.92);
  backdrop-filter: blur(6px);
}

/* 离线遮罩盖住整个后台 */
.offline-lock {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 7, 12, 0.82);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c8ba3;
  font-size: 13px;
  letter-spacing: 1.5px;
}

/* 在线/离线小圆点 */
.dot-online { background: #34d399; box-shadow: 0 0 6px #34d399; }
.dot-offline { background: #4e5b72; }

/* ============================ ON/OFF 拨动开关 ============================ */
.sw {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 62px;
  height: 28px;
  border-radius: 15px;
  cursor: pointer;
  user-select: none;
  transition: background 0.22s ease, border-color 0.22s ease;
  border: 1px solid #3f2230;
  background: linear-gradient(180deg, #d94343, #b32b2b);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.35);
  flex: 0 0 auto;
  vertical-align: middle;
}

.sw.on {
  border-color: #1f7a45;
  background: linear-gradient(180deg, #3cc463, #23a04b);
}

.sw-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  transition: transform 0.22s cubic-bezier(.4,.2,.2,1);
}

.sw.on .sw-knob { transform: translateX(34px); }

.sw-label {
  position: absolute;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
  transition: opacity 0.18s;
  pointer-events: none;
}

.sw-label.off-text { right: 8px; opacity: 1; }
.sw-label.on-text  { left: 8px;  opacity: 0; }
.sw.on .sw-label.off-text { opacity: 0; }
.sw.on .sw-label.on-text  { opacity: 1; }

.sw:hover { filter: brightness(1.08); }
.sw.disabled { opacity: .45; cursor: not-allowed; }

/* 小号，用于表格里 */
.sw.sm { width: 54px; height: 24px; border-radius: 13px; }
.sw.sm .sw-knob { width: 18px; height: 18px; }
.sw.sm.on .sw-knob { transform: translateX(30px); }
.sw.sm .sw-label { font-size: 8.5px; }

/* 权限设置弹窗里的行 */
.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #0b1220;
  border: 1px solid #1b2740;
  margin-bottom: 8px;
}
.perm-row .nm { font-size: 12.5px; color: #e9f0fa; }
.perm-row .cd { font-size: 10px; color: #4e5b72; letter-spacing: .5px; }
