/* ============================================================
   ENERGY CONSOLE · 充电桩智能管理端
   设计系统：深空黑蓝 + 能量青绿 + 分层卡片 + 等宽数据字
   ============================================================ */
:root {
  --bg-0: #050a18;
  --bg-1: #081026;
  --bg-2: #0b1530;
  --panel: rgba(16, 26, 52, .92);
  --panel-2: rgba(10, 17, 36, .9);
  --line: rgba(0, 229, 200, .13);
  --line-2: rgba(255, 255, 255, .07);
  --cyan: #00e5c8;
  --cyan-d: #00b8a5;
  --green: #2ecc71;
  --blue: #4da8ff;
  --amber: #ffc24b;
  --red: #ff5d6c;
  --text: #e6eeff;
  --text-2: #93a2c8;
  --text-3: #55618a;
  --mono: "JetBrains Mono", "Cascadia Code", SFMono-Regular, Consolas, monospace;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --r: 14px;
  --r-s: 10px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 10px 34px rgba(0, 0, 0, .38);
  --sh-3: 0 22px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 229, 200, .05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #2b3764 var(--bg-1); }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #2b3764; border-radius: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(0, 229, 200, .32); }
body {
  font-family: var(--sans);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  background:
    radial-gradient(1100px 540px at 90% -12%, rgba(0, 229, 200, .09), transparent 58%),
    radial-gradient(980px 520px at -8% 112%, rgba(77, 168, 255, .09), transparent 58%),
    linear-gradient(158deg, var(--bg-0), var(--bg-2) 55%, #060b1a);
  background-attachment: fixed;
}
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--cyan); text-decoration: none; }
.hidden { display: none !important; }

/* ============ 布局骨架 ============ */
.app { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; transition: grid-template-columns .25s; }
.app.collapsed { grid-template-columns: 66px 1fr; }

/* ---- 侧栏 ---- */
.side {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(11, 19, 42, .97), rgba(6, 11, 24, .97));
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 18px 18px; }
.brand-logo {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04121a;
  box-shadow: 0 0 26px rgba(0, 229, 200, .5);
}
.brand-name { font-size: 14.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: .14em; white-space: nowrap; margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.nav-group { margin: 10px 0 4px; }
.nav-group-title { font-size: 10px; color: var(--text-3); letter-spacing: .18em; padding: 10px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0; border-radius: 11px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all .18s;
  white-space: nowrap; user-select: none;
}
.nav-item:hover { background: rgba(0, 229, 200, .06); color: var(--text); }
.nav-item.active {
  background: linear-gradient(120deg, rgba(0, 229, 200, .17), rgba(0, 184, 165, .04));
  color: var(--cyan); border-color: rgba(0, 229, 200, .3);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.nav-item .ico { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; font-size: 15px; }
.collapsed .nav-item, .collapsed .nav-group-title, .collapsed .brand-name, .collapsed .brand-sub, .collapsed .side-user-name { justify-content: center; }
.collapsed .nav-group-title span, .collapsed .nav-item span:not(.ico), .collapsed .brand-name, .collapsed .brand-sub, .collapsed .side-user-name span:last-child { display: none; }
.side-user {
  padding: 14px 16px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: linear-gradient(135deg, #0f7a6b, var(--cyan-d));
  color: #eafffb; font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12);
}
.side-user-name { font-size: 12.5px; font-weight: 600; }
.side-user-role { font-size: 10.5px; color: var(--text-3); }

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px; height: 58px;
  background: rgba(8, 14, 30, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.toggle { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text-2); cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: all .18s; }
.toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.page-crumb { flex: 1; }
.page-crumb .t1 { font-size: 15.5px; font-weight: 800; letter-spacing: .02em; }
.page-crumb .t2 { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.logout-btn { font-size: 12px; color: var(--text-3); border: 1px solid var(--line-2); padding: 7px 12px; border-radius: 8px; cursor: pointer; background: transparent; transition: all .18s; }
.logout-btn:hover { color: var(--red); border-color: rgba(255, 93, 108, .35); }

/* ---- 主内容 ---- */
.main { padding: 26px 30px 50px; min-width: 0; animation: pageIn .32s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ 通用组件 ============ */
.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-2);
}
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 229, 200, .05); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-d));
  color: #04121a; border: none;
  box-shadow: 0 5px 18px rgba(0, 229, 200, .28);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(0, 229, 200, .4); transform: translateY(-1px); color: #04121a; }
.btn-danger { color: var(--red); border-color: rgba(255, 93, 108, .35); }
.btn-danger:hover { background: rgba(255, 93, 108, .1); border-color: var(--red); color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--cyan); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { transform: none; }

.input, .select, textarea.input {
  width: 100%; padding: 10px 13px; border-radius: var(--r-s);
  background: rgba(7, 12, 27, .7); color: var(--text);
  border: 1px solid var(--line-2); font-size: 13.5px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 200, .1); }
/* 日期选择器：暗色文字/日历控件；原生按钮本体替换为青色日历图标（保持可点击） */
input[type="date"] { color-scheme: dark; color: var(--text); }
input[type="date"]::-webkit-calendar-picker-indicator {
  width: 20px; height: 20px; border-radius: 6px; cursor: pointer; opacity: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300e5c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / 15px 15px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; letter-spacing: .06em; }
.field .req { color: var(--red); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.tag-idle { color: var(--green); background: rgba(46, 204, 113, .1); }
.tag-charging { color: var(--blue); background: rgba(77, 168, 255, .12); }
.tag-offline { color: var(--text-3); background: rgba(135, 150, 190, .1); }
.tag-fault { color: var(--red); background: rgba(255, 93, 108, .1); }
.mono { font-family: var(--mono); }
.dim { color: var(--text-3); }

/* ============ 登录页 ============ */
.shell-login {
  min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 920px) { .shell-login { grid-template-columns: 1fr; } .login-hero { display: none; } }
.login-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(640px 400px at 30% 22%, rgba(0, 229, 200, .16), transparent 62%),
    radial-gradient(600px 420px at 82% 82%, rgba(77, 168, 255, .13), transparent 60%),
    linear-gradient(160deg, #0a1330, #071022 70%);
  padding: 48px; text-align: center;
}
.login-hero::before, .login-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(0, 229, 200, .13);
}
.login-hero::before { width: 480px; height: 480px; animation: drift 9s ease-in-out infinite; }
.login-hero::after { width: 660px; height: 660px; animation: drift 12s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: scale(1.05) translateY(10px); opacity: .55; } }
.hero-logo {
  width: 92px; height: 92px; border-radius: 26px;
  display: grid; place-items: center; font-size: 44px;
  background: linear-gradient(135deg, var(--cyan), var(--green)); color: #04121a;
  box-shadow: 0 0 80px rgba(0, 229, 200, .55), 0 20px 50px rgba(0, 0, 0, .45);
  animation: glow 3.6s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: 0 0 110px rgba(0, 229, 200, .8), 0 20px 50px rgba(0, 0, 0, .45); } }
.hero-title { font-size: 27px; font-weight: 800; letter-spacing: .06em; }
.hero-eng { font-family: var(--mono); font-size: 12px; letter-spacing: .42em; color: var(--text-3); }
.hero-badges { display: flex; gap: 26px; font-size: 13px; color: var(--text-2); letter-spacing: .12em; }
.hero-badge { display: flex; align-items: center; gap: 8px; }
.hero-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 34px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .025); }
.hero-stat b { font-family: var(--mono); font-size: 30px; color: var(--cyan); }
.hero-stat span { font-size: 11px; color: var(--text-3); letter-spacing: .18em; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card {
  width: 100%; max-width: 400px; padding: 36px 36px 30px;
  border-radius: 20px;
  background: linear-gradient(165deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.login-card h2 { font-size: 19px; font-weight: 800; letter-spacing: .06em; margin-bottom: 8px; }
.login-card .sub { font-size: 13px; color: var(--text-2); margin-bottom: 28px; }
.login-alert { font-size: 12.5px; color: var(--red); background: rgba(255, 93, 108, .08); border: 1px solid rgba(255, 93, 108, .3); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; }
.login-btn {
  width: 100%; margin-top: 6px; padding: 13px; font-size: 15px;
  letter-spacing: .18em; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.login-btn .arr { transition: transform .2s; }
.login-btn:hover .arr { transform: translateX(5px); }
.login-foot { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px dashed rgba(255, 255, 255, .07); font-size: 11px; color: var(--text-3); letter-spacing: .14em; }

/* ============ 仪表盘 ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 14px; }
.kpi {
  position: relative; overflow: hidden; padding: 20px;
  display: flex; align-items: center; gap: 15px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: default;
}
.kpi:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: var(--sh-3); }
.kpi .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: rgba(255, 255, 255, .04); }
.kpi .num { font-family: var(--mono); font-size: 27px; font-weight: 700; color: var(--text); line-height: 1.05; }
.kpi .lbl { font-size: 11.5px; color: var(--text-3); letter-spacing: .1em; margin-top: 5px; }
.kpi.green .ic { background: rgba(46, 204, 113, .12); }
.kpi.green .num { color: var(--green); }
.kpi.blue .ic { background: rgba(77, 168, 255, .13); }
.kpi.blue .num { color: var(--blue); }
.kpi.cyan .ic { background: rgba(0, 229, 200, .12); box-shadow: 0 0 18px rgba(0, 229, 200, .25); }
.kpi.cyan .num { color: var(--cyan); }
.kpi.red .ic { background: rgba(255, 93, 108, .12); }
.kpi.red .num { color: var(--red); }
.kpi.amber .ic { background: rgba(255, 194, 75, .12); }
.kpi.amber .num { color: var(--amber); }
.kpi .glow { position: absolute; right: -24px; bottom: -30px; width: 130px; height: 90px; border-radius: 50%; filter: blur(6px); opacity: .12; background: radial-gradient(closest-side, var(--cyan), transparent); pointer-events: none; }

.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
.section-head h3 { font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.section-head .more { font-size: 12px; color: var(--text-3); }
.dash-grid2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .dash-grid2 { grid-template-columns: 1fr; } }
.dash-card { padding: 20px; }
.dash-card h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 16px; letter-spacing: .04em; }
/* 设备占比条 */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.bar-row .bl { width: 52px; font-size: 12.5px; color: var(--text-2); }
.bar-row .btrack { flex: 1; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.bar-row .bfill { height: 100%; border-radius: 6px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar-row .bv { width: 36px; text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--text); }
/* 最近设备 */
.pile-mini { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line-2); }
.pile-mini:last-child { border-bottom: none; }
.pile-mini .st { font-size: 16px; }
.pile-mini .sn { font-family: var(--mono); font-size: 12.5px; flex: 1; }
.pile-mini .loc { font-size: 11.5px; color: var(--text-3); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.tbl thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--text-3);
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
}
.tbl tbody td { padding: 13px 16px; font-size: 13px; border-bottom: 1px solid var(--line-2); color: var(--text); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: rgba(0, 229, 200, .05); }
.tbl .mono { font-size: 12.5px; }
/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 16px; font-size: 12.5px; }
.pager .page-btn { min-width: 30px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: all .18s; }
.pager .page-btn:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.pager .page-btn.active { background: linear-gradient(135deg, var(--cyan), var(--cyan-d)); color: #04121a; font-weight: 700; border: none; }
.pager .page-btn:disabled { opacity: .35; cursor: not-allowed; }
.pager .info { color: var(--text-3); margin-right: 8px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 8, 18, .66); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  border-radius: 18px; padding: 26px 28px;
  background: linear-gradient(165deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  animation: modalIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 16.5px; font-weight: 800; letter-spacing: .03em; margin-bottom: 6px; }
.modal .msub { font-size: 12px; color: var(--text-3); margin-bottom: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 8px; border: none; background: rgba(255,255,255,.05); color: var(--text-2); cursor: pointer; font-size: 14px; transition: all .18s; }
.modal-close:hover { color: var(--red); background: rgba(255,93,108,.1); }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 11px 22px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(165deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--sh-3);
  display: flex; align-items: center; gap: 9px;
  animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.ok { border-color: rgba(46, 204, 113, .5); }
.toast.err { border-color: rgba(255, 93, 108, .5); }
.toast.ok::before { content: "✓"; color: var(--green); font-weight: 800; }
.toast.err::before { content: "✕"; color: var(--red); font-weight: 800; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* 明细表（订单详情等） */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.detail-grid .dg { padding: 11px 13px; border-radius: 10px; background: rgba(255, 255, 255, .025); border: 1px solid var(--line-2); }
.detail-grid .dg .k { font-size: 11px; color: var(--text-3); letter-spacing: .1em; margin-bottom: 5px; }
.detail-grid .dg .v { font-size: 13.5px; font-weight: 600; word-break: break-all; }

/* 空态 */
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty .e-ico { font-size: 34px; margin-bottom: 12px; opacity: .6; }

/* 工具条（搜索/筛选） */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 340px; position: relative; }
.toolbar .search input { padding-left: 36px; }
.toolbar .search::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; }

/* 表格页头部 */
.page-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 224px; transform: translateX(-110%); transition: transform .25s; box-shadow: var(--sh-3); }
  .app.nav-open .side { transform: none; }
  .app.collapsed { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
}

/* ============ 充电桩状态墙 ============ */
.pile-wall { display: flex; flex-direction: column; gap: 10px; }
.pile-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
  padding: 12px 18px; border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  transition: transform .2s, box-shadow .25s, border-color .25s;
}
.pile-card:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.pc-status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: .06em; flex-shrink: 0; }
.pc-num { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); padding: 2px 9px; border-radius: 8px; flex-shrink: 0; }
.pc-sn { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.pc-live { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pc-live .pc-power { font-size: 15.5px; font-weight: 700; color: var(--text); }
.pc-order { font-family: var(--mono); font-size: 11.5px; color: var(--blue); background: rgba(77, 168, 255, .1); border: 1px solid rgba(77, 168, 255, .3); padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.pc-loc { margin-left: auto; font-size: 12px; color: var(--text-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-ts { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); flex-shrink: 0; }
.pc-msg { flex-basis: 100%; font-size: 11.5px; color: var(--amber); margin-top: 2px; }

/* —— 状态着色：空闲绿 / 充电中蓝（能量脉冲）/ 故障红 / 离线灰 —— */
.pile-card.st-idle { border-color: rgba(46, 204, 113, .34); box-shadow: 0 8px 26px rgba(0, 0, 0, .35), 0 0 16px rgba(46, 204, 113, .05); }
.pile-card.st-idle .pc-status { color: var(--green); background: rgba(46, 204, 113, .12); }
.pile-card.st-idle .pc-live .pc-power { color: var(--green); }
.pile-card.st-idle .pc-num { border-color: rgba(46, 204, 113, .25); }

.pile-card.st-charging { border-color: rgba(77, 168, 255, .5); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 22px rgba(77, 168, 255, .18); }
.pile-card.st-charging .pc-status { color: var(--blue); background: rgba(77, 168, 255, .14); animation: breatheBlue 1.6s ease-in-out infinite; }
.pile-card.st-charging .pc-live .pc-power { color: var(--blue); text-shadow: 0 0 16px rgba(77, 168, 255, .55); }
.pile-card.st-charging .pc-num { border-color: rgba(77, 168, 255, .4); }
@keyframes breatheBlue { 50% { box-shadow: 0 0 18px rgba(77, 168, 255, .55); } }

.pile-card.st-fault { border-color: rgba(255, 93, 108, .5); }
.pile-card.st-fault .pc-status { color: var(--red); background: rgba(255, 93, 108, .12); animation: breatheRed 1.1s ease-in-out infinite; }
.pile-card.st-fault .pc-live .pc-power { color: var(--red); }
@keyframes breatheRed { 50% { box-shadow: 0 0 16px rgba(255, 93, 108, .5); } }

.pile-card.st-offline { opacity: .6; border-color: rgba(120, 134, 170, .25); }
.pile-card.st-offline .pc-status { color: var(--text-3); background: rgba(135, 150, 190, .1); }
.pile-card.st-offline .pc-live .pc-power { color: var(--text-3); }

/* 地域分区（按安装位置分组 · 可折叠） */
.pile-area { margin-bottom: 20px; }
.pa-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 2px 2px 12px; padding-bottom: 9px;
  border-bottom: 1px dashed rgba(255, 255, 255, .08);
  cursor: pointer; user-select: none;
  transition: border-color .2s;
}
.pa-head:hover { border-color: rgba(0, 229, 200, .25); }
.pa-name { font-size: 15px; font-weight: 700; color: var(--cyan); letter-spacing: .03em; }
.pa-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pa-tag {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--text-2);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
}
.pa-tag.on { color: var(--blue); background: rgba(77, 168, 255, .14); border-color: rgba(77, 168, 255, .4); box-shadow: 0 0 12px rgba(77, 168, 255, .3); }
.pa-toggle {
  margin-left: auto; font-size: 12px; color: var(--text-3);
  transition: transform .25s ease; align-self: center; line-height: 1;
}
.pile-area.collapsed .pa-toggle { transform: rotate(-90deg); color: var(--cyan); }
.pile-area.collapsed .pile-wall { display: none; }
.pile-area.collapsed .pa-head { margin-bottom: 2px; }

/* 近7天流水 */
.flow-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.flow-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.fr-date { width: 46px; color: var(--text-2); font-family: var(--mono); flex-shrink: 0; }
.fr-track { flex: 1; height: 8px; border-radius: 5px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.fr-bar { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--cyan-d), var(--cyan)); box-shadow: 0 0 10px rgba(0, 229, 200, .28); transition: width .5s ease; }
.fr-val { width: 170px; text-align: right; font-family: var(--mono); color: var(--text-2); flex-shrink: 0; white-space: nowrap; }
.fr-refund { color: var(--amber); }

/* ====================================================================
   全面移动端适配（<=900px 抽屉 / <=640px 深度优化）
   ==================================================================== */
.drawer-mask {
  display: none;
  position: fixed; inset: 0; z-index: 39;
  background: rgba(4, 8, 18, .55);
  backdrop-filter: blur(3px);
}
.drawer-mask.show { display: block; animation: fadeIn .22s ease; }

html { -webkit-text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: transparent; }
input, select, textarea, button { font-size: 16px; } /* 防止 iOS 聚焦自动放大 */

/* 触控反馈 */
.btn:active, .page-btn:active, .toggle:active, .nav-item:active, .app-card:active, .pile-card:active, .topbar-toggle:active { transform: scale(.97); }
.app-card, .pile-card, .nav-item { cursor: pointer; }

@media (max-width: 900px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .topbar { height: 52px; padding: 0 12px; gap: 10px; }
  .topbar .clock { display: none; }
  .topbar-right { gap: 8px; }
  .logout-btn { font-size: 0; width: 34px; height: 34px; padding: 0; border-radius: 9px; display: grid; place-items: center; }
  .logout-btn::before { content: "⏻"; font-size: 15px; }
  .main { padding: 16px 14px 48px; }
  .page-crumb .t2 { display: none; }
  .side { width: 248px; }
  .side-user { padding: 12px 14px; }

  /* KPI：2列紧凑 */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi .ic { width: 38px; height: 38px; font-size: 17px; border-radius: 11px; }
  .kpi .num { font-size: 22px; }

  /* 设备墙：行式列表，小屏压缩 */
  .pile-card { padding: 10px 13px; gap: 6px 12px; }
  .pc-live { font-size: 11px; }
  .pc-live .pc-power { font-size: 14px; }
  .pc-status { font-size: 10px; padding: 3px 8px; }
  .pc-num { font-size: 11px; padding: 1px 7px; }
  .pc-sn { max-width: 120px; font-size: 10.5px; }
  .pc-loc { max-width: none; font-size: 11px; margin-left: 0; flex-basis: 100%; }

  /* 今日经营 */
  .today-num { font-size: 19px; }

  /* 工具栏/搜索全宽 */
  .toolbar .search { max-width: none; min-width: 0; flex: 1 1 100%; }
  .toolbar .search input { width: 100%; }
  .toolbar .select { flex: 1; min-width: 0; }
  .toolbar .btn { flex-shrink: 0; }

  /* 统计卡/图 */
  .detail-grid { grid-template-columns: 1fr; }
  .dash-card { padding: 16px; }
  .app-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-card { padding: 12px 10px; font-size: 12px; }
}

@media (max-width: 640px) {
  /* 登录页卡片全宽 */
  .login-side { padding: 18px; }
  .login-card { padding: 28px 22px 24px; border-radius: 16px; }

  /* 弹窗 → 底部抽屉 */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none; width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    max-height: 88vh;
    animation: sheetUp .3s cubic-bezier(.2, .9, .3, 1.1);
  }
  @keyframes sheetUp { from { transform: translateY(60%); opacity: .6; } to { transform: none; opacity: 1; } }
  .modal-foot { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--panel-2) 30%); padding-top: 12px; }
  .modal-foot .btn { flex: 0 0 auto; }

  /* 三列 → 2列 mesh 调整 */
  .today-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .today-cell { padding: 12px 6px; }
  .today-num { font-size: 16px; }

  /* 设备墙：保持纵向列表 */
  .pc-loc { max-width: none; }

  /* 表格横向滚动提示 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .tbl thead th, .tbl tbody td { padding: 11px 14px; }

  /* 按钮 */
  .btn { padding: 11px 16px; }
  .btn-sm { padding: 7px 10px; }

  /* 详情 grid */
  .detail-grid .dg { padding: 9px 11px; }

  /* 分页 */
  .pager { flex-wrap: wrap; justify-content: center; }
  .pager .info { flex-basis: 100%; text-align: center; margin-bottom: 6px; margin-right: 0; }

  /* 花架顶部信息压缩 */
  .page-title { font-size: 18px; }
  .page-title::after { width: 44px; }

  /* toast 顶部居中 + 安全区 */
  .toast-wrap { top: calc(12px + env(safe-area-inset-top)); }

  /* 实时数据弹窗表格窄屏 */
  .stat-num { font-size: 24px; }
}

/* 超小屏：设备墙保持纵向列表（无需额外规则） */
@media (max-width: 400px) {
  .pile-card { padding: 9px 11px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= 流水查询 · 旗舰版 =================
   暗色能量渐变延续；近7天流水 + 总流水 双模块 */
.fl-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.fl-title { font-size: 22px; font-weight: 900; letter-spacing: .02em; }
.fl-title::after { content: ''; display: block; width: 46px; height: 3px; margin-top: 8px; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue)); box-shadow: 0 0 12px rgba(0, 229, 200, .5); }
.fl-sub { font-size: 12px; color: var(--text-3); letter-spacing: .02em; margin-top: 8px; }
.fl-filter { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; padding-bottom: 4px; }

/* ---- 顶部总流水 HERO ---- */
.fl-hero { position: relative; overflow: hidden; display: flex; gap: 26px; align-items: stretch; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 20px; padding: 26px 30px;
  background: linear-gradient(135deg, rgba(16, 26, 52, .95), rgba(8, 16, 38, .92) 60%, rgba(6, 11, 26, .9));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), 0 0 60px rgba(0, 229, 200, .06); }
.fl-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 300px at 12% -20%, rgba(0, 229, 200, .14), transparent 60%),
              radial-gradient(500px 260px at 88% -10%, rgba(77, 168, 255, .16), transparent 60%); }
.fl-hero-main { position: relative; flex: 1 1 300px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.fl-hero-cap { font-size: 11.5px; letter-spacing: .28em; color: var(--text-3); text-transform: uppercase; }
.fl-hero-big { display: flex; align-items: baseline; gap: 6px; }
.fl-hero-big .cny { font-size: 24px; font-weight: 900; color: var(--cyan); }
.fl-hero-big .mono { font-size: clamp(34px, 5vw, 54px); font-weight: 800; line-height: 1; letter-spacing: .01em;
  color: var(--text); text-shadow: 0 0 30px rgba(0, 229, 200, .35); }
.fl-hero-tag { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.fl-hero-meta { position: relative; flex: 1 1 380px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fl-mcell { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line-2); }
.fl-mcell span { font-size: 11px; color: var(--text-3); letter-spacing: .06em; }
.fl-mcell b { font-size: 18px; color: var(--text); }
.fl-mcell i { font-style: normal; font-size: 11px; color: var(--text-3); }
.big-neg, .neg { color: var(--red); }

/* ---- 区块容器 ---- */
.fl-sec { margin-top: 26px; }
.fl-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.fl-sec-head h3 { font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.fl-sec-head h3::before { content: '▍'; color: var(--cyan); margin-right: 4px; }
.fl-sec-head .more { font-size: 12px; color: var(--text-3); }

/* ---- 近7天明细表 / 总流水查询 ---- */
.fl-tbl-wrap7 { overflow-x: auto; }
.fl-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-search > span { font-size: 12.5px; color: var(--text-2); }
.fl-search .input { width: 150px; }
.fl-hint { margin-left: auto; font-size: 12.5px; color: var(--text-2); font-family: var(--mono); }
.fl-hint b { color: var(--cyan); font-weight: 700; }
.fl-hint b.neg { color: var(--red); }
.fl-all { min-width: 760px; }

/* ---- 近7天明细表 ---- */
.fl-tbl-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(165deg, var(--panel), var(--panel-2)); }
.fl-table { min-width: 560px; }
.fl-table th.c, .fl-table td.c { text-align: center; }
.fl-table th.r, .fl-table td.r { text-align: right; }
.fl-table td.fw { font-weight: 700; color: var(--text); }
.fl-table td.neg { color: var(--red); }
.fl-table .sum-row td { font-weight: 800; color: var(--text); background: rgba(0, 229, 200, .05); border-top: 1px solid var(--line); }

.tot-note { margin-top: 14px; font-size: 11.5px; color: var(--text-3); line-height: 1.7; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); }

@media (max-width: 860px) {
  .fl-hero { padding: 20px; }
  .fl-hero-meta { grid-template-columns: 1fr; }
  .fl-hint { margin-left: 0; flex-basis: 100%; }
}