:root {
  --navy: #1E2A3A;
  --bg: #F0F3F8;
  --pink: #E91E63;
  --ink: #2A3646;
  --muted: #7A8899;
  --ok: #2E7D32;
  --warn: #F9A825;
  --bad: #C62828;
  --line: #E4E8EE;
  --cyan: #00D4C8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
#app { min-height: 100%; }

/* —— Toast —— */
.toast-wrap {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-item {
  min-width: 200px; max-width: 90vw; padding: 12px 18px; border-radius: 12px;
  background: rgba(15, 23, 42, .92); color: #fff; font-size: 13px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28); animation: toastIn .28s ease;
}
.toast-item.err { background: rgba(183, 28, 28, .95); }
.toast-item.ok { background: rgba(27, 94, 32, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* —— 登录 / 找回：炫酷壳 —— */
.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 28px 16px;
  position: relative; overflow: hidden;
  background: #070B14;
}
.auth-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.auth-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: orbFloat 14s ease-in-out infinite;
}
.auth-bg .orb.a {
  width: 420px; height: 420px; left: -8%; top: -12%;
  background: radial-gradient(circle, #E91E63 0%, transparent 70%);
}
.auth-bg .orb.b {
  width: 380px; height: 380px; right: -6%; bottom: -10%;
  background: radial-gradient(circle, #00D4C8 0%, transparent 70%);
  animation-delay: -4s;
}
.auth-bg .orb.c {
  width: 280px; height: 280px; left: 42%; top: 48%;
  background: radial-gradient(circle, #2962FF 0%, transparent 70%);
  animation-delay: -8s; opacity: .35;
}
.auth-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: gridDrift 28s linear infinite;
}
.auth-bg .scan {
  position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg, transparent, rgba(233,30,99,.08), transparent);
  animation: scanY 7s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -30px) scale(1.08); }
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}
@keyframes scanY {
  0% { top: -10%; }
  100% { top: 110%; }
}

.auth-shell {
  position: relative; z-index: 1; width: 100%; max-width: 980px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0;
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  animation: cardIn .55s cubic-bezier(.2,.8,.2,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.auth-hero {
  padding: 48px 40px; color: #fff;
  background:
    linear-gradient(155deg, rgba(233,30,99,.35), transparent 50%),
    linear-gradient(200deg, #121A2B 0%, #0C1220 100%);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 560px;
}
.auth-hero .logo {
  font-size: 28px; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(90deg, #fff, #FF80AB, #80DEEA);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero .tag {
  display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: .12em; color: #80DEEA;
  border: 1px solid rgba(128,222,234,.35); background: rgba(0,212,200,.08);
}
.auth-hero h2 {
  margin: 48px 0 12px; font-size: 34px; line-height: 1.25; font-weight: 800;
}
.auth-hero h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #FF4081, #00D4C8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero p { margin: 0; color: rgba(255,255,255,.62); font-size: 14px; line-height: 1.7; max-width: 320px; }
.auth-feats { margin-top: 36px; display: grid; gap: 10px; }
.auth-feats li {
  list-style: none; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,.78);
}
.auth-feats .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 12px rgba(233,30,99,.8);
}
.auth-panel {
  padding: 40px 36px 32px;
  background: rgba(255,255,255,.97);
}
.auth-panel .panel-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--navy); }
.auth-panel .panel-sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600;
}
.auth-field input, .field input, .field select, .field textarea {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; font-size: 14px; outline: none; background: #F8FAFC;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-field input:focus, .field input:focus {
  border-color: var(--pink); background: #fff;
  box-shadow: 0 0 0 3px rgba(233,30,99,.12);
}
.auth-field .pwd-wrap { position: relative; }
.auth-field .pwd-wrap input { padding-right: 48px; }
.auth-field .eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; padding: 6px;
}

.auth-btn {
  width: 100%; height: 48px; border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #E91E63, #C2185B 55%, #AD1457);
  box-shadow: 0 10px 28px rgba(233,30,99,.38);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.auth-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn {
  height: 44px; border: 0; border-radius: 12px; background: var(--navy); color: #fff;
  font-weight: 700; cursor: pointer; padding: 0 16px; font-size: 14px;
}
.btn.pink { background: var(--pink); }
.btn.amber { background: #FF9800; color: #fff; }
.btn.amber:hover { filter: brightness(1.05); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid #DDE3EA; }
.btn.sm { height: 34px; font-size: 12px; padding: 0 12px; }

.auth-links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; font-size: 13px;
}
.auth-links a { color: var(--pink); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.auth-guard {
  margin-top: 16px; padding: 10px 12px; border-radius: 10px;
  background: #F0F7FF; color: #1565C0; font-size: 12px; line-height: 1.5;
  border: 1px solid #BBDEFB;
}
.muted { color: var(--muted); font-size: 12px; }
.err { color: var(--bad); font-size: 13px; margin: 8px 0; }
.okmsg { color: var(--ok); font-size: 13px; }

/* 图形滑块 */
.slider-wrap { margin-bottom: 14px; }
.slider-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.slider-head button {
  border: 0; background: transparent; color: var(--pink); cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 0;
}
.slider {
  position: relative; height: 48px; border-radius: 14px; overflow: hidden;
  user-select: none; border: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, #F4F6F9, #F4F6F9 8px, #EEF1F6 8px, #EEF1F6 16px);
}
.slider .track-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(233,30,99,.08), rgba(0,212,200,.18));
  transition: background .2s;
}
.slider .gap {
  position: absolute; top: 7px; width: 34px; height: 34px; border-radius: 10px;
  border: 2px dashed rgba(233,30,99,.5); background: rgba(233,30,99,.1);
  pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.slider .knob {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(145deg, #2A3646, #1E2A3A); color: #fff;
  display: grid; place-items: center; cursor: grab; font-size: 16px; font-weight: 800;
  z-index: 2; box-shadow: 0 6px 16px rgba(30,42,58,.35);
}
.slider .knob:active { cursor: grabbing; }
.slider.ok {
  border-color: #A5D6A7;
  background: linear-gradient(90deg, #E8F5E9, #F1F8E9);
}
.slider.ok .knob {
  background: linear-gradient(145deg, #43A047, #2E7D32);
  box-shadow: 0 6px 16px rgba(46,125,50,.35);
}
.slider .tip {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 13px; pointer-events: none; padding-left: 36px;
}
.slider.ok .tip { color: var(--ok); font-weight: 700; }

/* 密码强度 */
.pw-meter {
  height: 6px; background: #EEF1F6; border-radius: 99px; overflow: hidden; margin: 0 0 8px;
}
.pw-meter > i { display: block; height: 100%; width: 0; background: var(--bad); transition: .25s; }
.pw-meter.s1 > i { width: 25%; background: var(--bad); }
.pw-meter.s2 > i { width: 50%; background: var(--warn); }
.pw-meter.s3 > i { width: 75%; background: #43A047; }
.pw-meter.s4 > i { width: 100%; background: var(--ok); }
.pw-tips { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.pw-checks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 14px;
}
.pw-check {
  font-size: 11px; padding: 6px 8px; border-radius: 8px;
  background: #F4F6F9; color: #8A93A3; display: flex; align-items: center; gap: 6px;
}
.pw-check.on { background: #E8F5E9; color: var(--ok); }
.pw-check .mk {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor;
  display: grid; place-items: center; font-size: 9px; flex-shrink: 0;
}
.sms-row { display: flex; gap: 8px; }
.sms-row input { flex: 1; }
.sms-row button { flex-shrink: 0; min-width: 118px; height: 46px; margin: 0; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-hero { min-height: auto; padding: 28px 24px; }
  .auth-hero h2 { margin-top: 20px; font-size: 26px; }
  .auth-feats { display: none; }
  .auth-panel { padding: 28px 22px 24px; }
  .pw-checks { grid-template-columns: 1fr; }
}

/* —— 壳（银豹式：图标栏 + 二级菜单 + 工作区） —— */
.shell {
  display: grid;
  grid-template-columns: 72px 200px 1fr;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #F3F5F8;
}
.rail {
  background: #2B313B;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 0 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  z-index: 3;
}
.rail-brand {
  height: 48px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  color: #FFD54F;
  margin-bottom: 8px;
}
.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: 11px;
  border-left: 3px solid transparent;
}
.rail-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.rail-item.on {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: #FFD54F;
}
.rail-ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  font-size: 13px; font-weight: 800;
}
.rail-item.on .rail-ico { background: rgba(255,213,79,.2); color: #FFD54F; }
.rail-t { line-height: 1.1; }

.subside {
  background: #fff;
  border-right: 1px solid #E6EAF0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  z-index: 2;
}
.sub-head { padding: 18px 16px 12px; border-bottom: 1px solid #F0F2F5; }
.sub-title { font-size: 16px; font-weight: 800; color: #1F2937; }
.sub-role { margin-top: 4px; font-size: 12px; color: #98A2B3; }
.sub-nav { padding: 10px 8px 24px; display: flex; flex-direction: column; gap: 2px; }
.sub-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #4B5563;
  text-decoration: none;
  font-size: 13px;
}
.sub-item:hover { background: #F5F7FA; color: #111827; }
.sub-item.on {
  background: #FFF8E7;
  color: #B45309;
  font-weight: 700;
}

.workspace {
  min-width: 0; display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}
.topbar {
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #E6EAF0;
  z-index: 1;
}
.crumb { font-size: 13px; color: #98A2B3; }
.crumb b { color: #1F2937; font-weight: 700; }
.top-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.top-r select {
  height: 32px; border-radius: 8px; border: 1px solid #E5E7EB; padding: 0 10px; background: #fff;
}
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; background: #F3F4F6; color: #4B5563;
}
.chip.soft { background: #F8FAFC; color: #64748B; }
.chip.on { background: #ECFDF5; color: #047857; }
.work-body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 16px 20px 48px;
}
.work-body.is-list {
  overflow: hidden;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 12px; padding: 16px; border: 1px solid #EEF1F6; }
.kpi b { display: block; font-size: 26px; }
.kpi span { color: var(--muted); font-size: 12px; }
.panel { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 14px; border: 1px solid #EEF1F6; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.list-panel { padding: 0; overflow: hidden; }
.list-panel.list-fill {
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}
.list-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #F0F2F5; flex-wrap: wrap;
  background: #fff;
}
.list-title { font-size: 16px; font-weight: 800; color: #1F2937; }
.list-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-search {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #DDE3EA; border-radius: 6px; padding: 3px 3px 3px 10px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.list-search-ico {
  color: #98A2B3; font-size: 14px; line-height: 1; flex-shrink: 0;
}
.list-search input {
  width: 240px; max-width: 42vw; height: 30px; border: 0; outline: none; background: transparent; font-size: 13px;
}
.list-search .btn.sm { height: 30px; border-radius: 5px; padding: 0 14px; }
.list-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
}
.list-body { padding: 0 0 8px; }
.list-meta { font-size: 12px; color: #98A2B3; margin: 10px 16px 6px; }
.tip-line { margin: 10px 16px 0; }
.list-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-top: 1px solid #Eef1F6;
  background: #FAFBFC;
  min-height: 44px;
}
.list-foot-l { font-size: 12px; color: #667085; }
.list-foot-l b { color: #1F2937; }
.list-foot-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-btn {
  height: 28px; min-width: 28px; padding: 0 8px;
  border: 1px solid #E5E7EB; border-radius: 6px;
  background: #fff; color: #4B5563; font-size: 12px; cursor: pointer;
}
.pg-btn:hover:not(:disabled) { border-color: #FF9800; color: #E65100; }
.pg-btn.on { background: #FF9800; border-color: #FF9800; color: #fff; font-weight: 700; }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
#listPageSize {
  height: 28px; border: 1px solid #E5E7EB; border-radius: 6px;
  padding: 0 8px; background: #fff; font-size: 12px; color: #4B5563;
}
table, .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #EEF1F6; text-align: left; padding: 9px 12px; vertical-align: middle; }
.data-table thead th {
  color: #6B7280; font-weight: 600; background: #F5F7FA;
  position: sticky; top: 0; z-index: 2;
  box-shadow: 0 1px 0 #E6EAF0;
}
th { color: #6B7280; font-weight: 600; background: #FAFBFC; }
tbody tr:hover { background: #FBFCFE; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar b { margin-right: auto; }

/* 兼容旧类名 */
.side { display: none; }
.main { padding: 20px 28px 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.top select { height: 36px; border-radius: 8px; border: 1px solid var(--line); padding: 0 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.perm-block { margin-bottom: 14px; }
.perm-g { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.perm-g a { color: var(--pink); font-weight: 500; font-size: 12px; cursor: pointer; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: #F4F6F9; color: #8A93A3; font-size: 12px; cursor: pointer; border: 1px solid transparent;
}
.perm-chip.on { background: #FCE4EC; color: var(--pink); border-color: #F8BBD0; }
.perm-chip .tag { font-size: 10px; opacity: .7; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal {
  width: 640px; max-width: 100%; max-height: 86vh; overflow: auto; background: #fff;
  border-radius: 16px; padding: 20px;
}
.modal h3 { margin: 0 0 14px; }
.modal-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.st-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.st { background: #fff; border-radius: 12px; padding: 14px; border: 1px solid var(--line); cursor: pointer; }
.st.s1 { border-color: var(--pink); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #F4F6F9; }
.badge.on { background: #E8F5E9; color: var(--ok); }
.badge.off { background: #FFEBEE; color: var(--bad); }

.login-box input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-bottom: 12px; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 64px 168px 1fr; }
  .kpis, .grid2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: visible; }
  .workspace { height: auto; min-height: 100vh; overflow: visible; }
  .work-body.is-list { overflow: visible; }
  .list-panel.list-fill { min-height: 60vh; }
  .rail {
    position: relative; height: auto; flex-direction: row; flex-wrap: wrap;
    justify-content: flex-start; padding: 8px;
  }
  .rail-item { flex-direction: row; gap: 6px; padding: 8px 10px; border-left: 0; border-bottom: 2px solid transparent; }
  .rail-item.on { border-bottom-color: #FFD54F; }
  .subside { position: relative; height: auto; border-right: 0; border-bottom: 1px solid #E6EAF0; }
  .sub-nav { flex-direction: row; flex-wrap: wrap; }
  .kpis, .grid2 { grid-template-columns: 1fr; }
  .list-search input { width: 140px; }
}
