/* ==========================================================================
   微语 VeYu · 后台设计系统
   骨架沿用 T9 数查（浅色 / 深色侧栏 / 细线分割），主色换成微语珊瑚红
   ========================================================================== */
:root {
  --brand: #e2654f;
  --brand-hi: #ef8168;
  --brand-lo: #c94b38;
  --brand-soft: #fdf0ed;
  --brand-line: #f7d6cf;

  --bg: #f4f6f9;
  --surface: #fff;
  --surface-2: #fafbfd;
  --surface-3: #f6f8fb;
  --line: #ecedf1;
  --line-2: #e0e3e9;

  --ink-1: #0f1720;
  --ink-2: #39424f;
  --ink-3: #6b7482;
  --ink-4: #9aa2ad;

  --ok: #0ea472;
  --ok-soft: #e8f8f2;
  --warn: #e8830c;
  --warn-soft: #fef4e6;
  --danger: #e5484d;
  --danger-soft: #fdeded;
  --violet: #7357ff;
  --violet-soft: #f0edff;
  --cyan: #0a9dc4;
  --cyan-soft: #e6f6fb;

  --side-bg: #0d1b2b;
  --side-bg-2: #101f31;
  --side-line: rgba(255, 255, 255, .07);
  --side-text: #97a6b8;
  --side-text-hi: #fff;

  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px;
  --sh-xs: 0 1px 2px rgba(16,24,40,.04);
  --sh-sm: 0 1px 3px rgba(16,24,40,.05), 0 1px 2px rgba(16,24,40,.03);
  --sh-md: 0 6px 18px rgba(16,24,40,.07), 0 1px 3px rgba(16,24,40,.04);
  --sh-lg: 0 24px 56px rgba(16,24,40,.16);

  --font: "Inter", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 13px; color: var(--ink-2);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 登录 */
/* 品牌方块（登录页大号、侧栏小号共用） */
.logo {
  width: 46px; height: 46px; border-radius: 13px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(226, 101, 79, .35);
}
.logo svg { width: 30px; height: 30px; }
.logo.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.logo.sm svg { width: 22px; height: 22px; }

.login { display: flex; min-height: 100vh; }
.login-left {
  position: relative; width: 50%; min-width: 420px; padding: 56px 48px;
  background: linear-gradient(150deg, #17293d 0%, #0d1b2b 55%, #0a1624 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
/* 极淡的氛围光，避免大面积纯深色显得空（范围放大、透明度压低，防止出现色斑） */
.login-left::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(880px 620px at 90% 4%, rgba(226, 101, 79, .085), transparent 68%),
    radial-gradient(700px 520px at -10% 100%, rgba(110, 160, 235, .05), transparent 66%);
}
/* 内容块整体水平居中，内部左对齐 —— 参考 LinkTalk 登录页的版心位置 */
.login-inner { position: relative; z-index: 2; width: 100%; max-width: 420px; margin: 0 auto; }

.login-logo {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(226, 101, 79, .32);
}
.login-logo svg { width: 28px; height: 28px; }

.login-title {
  font-size: 28px; font-weight: 700; letter-spacing: 1.5px; color: #fff; line-height: 1.22;
}
.login-title span {
  font-size: 15px; font-weight: 600; letter-spacing: 2.4px;
  color: rgba(255,255,255,.42); margin-left: 10px; vertical-align: 3px;
}
.login-tag {
  margin-top: 12px; font-size: 15px; font-weight: 600; letter-spacing: 1px; color: var(--brand-hi);
}
.login-desc {
  margin-top: 16px; font-size: 13.5px; line-height: 2.05; color: rgba(255,255,255,.5);
}

.login-feats {
  margin: 28px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 15px;
}
.login-feats li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.5);
}
.login-feats li svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--brand-hi); opacity: .85; }
.login-feats em { font-style: normal; font-weight: 600; color: rgba(255,255,255,.82); margin-right: 8px; }

.login-wave { display: block; width: 100%; height: 38px; margin-top: 30px; opacity: .32; }

/* 矮屏（笔记本小窗）压缩纵向节奏 */
@media (max-height: 720px) {
  .login-left { padding: 34px 44px; }
  .login-logo { width: 40px; height: 40px; margin-bottom: 16px; }
  .login-logo svg { width: 24px; height: 24px; }
  .login-title { font-size: 24px; }
  .login-tag { margin-top: 10px; font-size: 14px; }
  .login-desc { margin-top: 12px; font-size: 13px; line-height: 1.9; }
  .login-feats { margin-top: 22px; gap: 12px; }
  .login-feats li { font-size: 13px; }
  .login-wave { height: 30px; margin-top: 22px; }
}

.login-right {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-copy {
  position: absolute; left: 0; right: 0; bottom: 28px; text-align: center;
  font-size: 11px; color: var(--ink-4); letter-spacing: .5px;
}
.login-card { width: 320px; }
.login-card h3 { font-size: 22px; color: var(--ink-1); font-weight: 600; letter-spacing: .5px; }
.login-card .sub { font-size: 12px; color: var(--ink-4); margin: 9px 0 26px; }
/* 登录表单输入框：浅灰底、无边框，聚焦时转白底 + 主色描边 */
.login-right .fld input {
  height: 42px; background: #f4f6fa; border-color: transparent;
}
.login-right .fld input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-right .btn.primary { height: 42px; font-size: 14px; letter-spacing: 2px; }
.fld { display: block; margin-bottom: 16px; }
.fld span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 7px; }
.fld input, .fld select, .fld textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-md); background: #fff; outline: none; transition: .15s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.chk { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); margin-bottom: 22px; }
.chk input { accent-color: var(--brand); }
.btn {
  height: 38px; padding: 0 16px; border: 1px solid var(--line-2); background: #fff;
  border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-4); color: var(--ink-1); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; height: 44px; font-size: 14px; letter-spacing: 3px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.login-err { margin-top: 14px; font-size: 12px; color: var(--danger); min-height: 16px; }

/* ---------------------------------------------------------------- 骨架 */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 216px; background: var(--side-bg);
  display: flex; flex-direction: column; padding: 18px 12px 12px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.side-brand-txt b { display: block; color: #fff; font-size: 15px; letter-spacing: 2px; }
.side-brand-txt i { font-style: normal; font-size: 10px; color: var(--side-text); letter-spacing: 1.5px; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav a, .nav-label {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: var(--r-sm); color: var(--side-text); font-size: 13px; cursor: pointer;
  transition: .14s; border-left: 2px solid transparent;
}
.nav a svg, .nav-label svg { width: 17px; height: 17px; opacity: .85; }
.nav a:hover, .nav-label:hover { background: var(--side-bg-2); color: #dfe7f1; }
.nav a.active {
  background: linear-gradient(90deg, rgba(226,101,79,.20), rgba(226,101,79,.04));
  color: #fff; border-left-color: var(--brand); font-weight: 500;
}
.nav a.active svg { opacity: 1; color: var(--brand-hi); }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.nav-label { color: var(--side-text); font-size: 13px; cursor: pointer; user-select: none; }
.nav-label span { flex: 1; }
.nav-label .chev {
  width: 13px; height: 13px; opacity: .5;
  transition: transform .18s ease; transform: rotate(90deg);
}
.nav-group.collapsed .nav-label .chev { transform: rotate(0deg); }
/* 子菜单折叠：用 max-height 过渡，避免 display:none 造成的跳变 */
.nav-sub {
  display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  max-height: 120px; opacity: 1; transition: max-height .2s ease, opacity .16s ease;
}
.nav-group.collapsed .nav-sub { max-height: 0; opacity: 0; }
.nav a.sub { height: 36px; padding-left: 40px; font-size: 12.5px; }
.nav a.sub.active { padding-left: 40px; }

.side-foot {
  display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px;
  border-top: 1px solid var(--side-line); margin-top: 10px;
}
.side-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.side-user-txt { min-width: 0; }
.side-user-txt b { display: block; color: #fff; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-txt i { font-style: normal; font-size: 10.5px; color: var(--side-text); }
.side-logout {
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--side-text);
  border-radius: var(--r-xs); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.side-logout:hover { background: var(--side-bg-2); color: #fff; }
.side-logout svg { width: 16px; height: 16px; }

.main { flex: 1; margin-left: 216px; display: flex; flex-direction: column; min-width: 0; }
.top {
  height: 60px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.top-title { display: flex; align-items: baseline; gap: 10px; }
.top-title h2 { font-size: 16px; font-weight: 600; color: var(--ink-1); }
.top-title span { font-size: 12px; color: var(--ink-4); }
.top-right { display: flex; align-items: center; gap: 14px; }
.date { font-size: 12px; color: var(--ink-4); }
.view { padding: 18px 22px 40px; }

/* ---------------------------------------------------------------- 卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--sh-xs);
}
.stat .k { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 26px; font-weight: 650; color: var(--ink-1); margin-top: 8px; letter-spacing: -.5px; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--ink-4); margin-left: 4px; letter-spacing: 0; }
.stat .d { font-size: 11.5px; color: var(--ink-4); margin-top: 6px; }
.stat.accent { background: linear-gradient(160deg, #fff, var(--brand-soft)); border-color: var(--brand-line); }
.stat.accent .v { color: var(--brand-lo); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-xs); margin-top: 16px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.panel-head .hint { font-size: 11.5px; color: var(--ink-4); }
.panel-body { padding: 16px 18px; }
.panel-body.tight { padding: 0; }

/* 趋势柱状 */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding: 10px 4px 0; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar {
  width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--brand-hi), var(--brand));
  border-radius: 5px 5px 3px 3px; min-height: 3px; position: relative; transition: .2s;
}
.chart .bar.zero { background: var(--line-2); }
.chart .bar:hover { filter: brightness(1.06); }
.chart .bar .tip {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  background: var(--ink-1); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 5px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: .15s;
}
.chart .bar:hover .tip { opacity: 1; }
.chart .lb { font-size: 10.5px; color: var(--ink-4); }

/* ---------------------------------------------------------------- 筛选与表格 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1; }
.inp {
  height: 34px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; outline: none; transition: .15s; min-width: 150px;
}
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inp.search { padding-left: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%239aa2ad' stroke-width='2'/%3E%3Cpath d='m16 16 4.5 4.5' stroke='%239aa2ad' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 9px center/15px no-repeat; }
select.inp { min-width: 120px; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; white-space: nowrap; }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th {
  font-size: 12px; font-weight: 500; color: var(--ink-3); background: var(--surface-3);
  position: sticky; top: 0; z-index: 1; user-select: none;
}
table.tbl th.sortable { cursor: pointer; }
table.tbl th.sortable:hover { color: var(--ink-1); }
table.tbl th .arrow { font-size: 9px; margin-left: 3px; color: var(--ink-4); }
table.tbl tbody tr { transition: .12s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td.num { font-variant-numeric: tabular-nums; }
table.tbl td.name { font-weight: 500; color: var(--ink-1); }
table.tbl .sub-cell { display: block; font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.link { color: var(--brand); cursor: pointer; }
.link + .link { margin-left: 12px; }
.link:hover { text-decoration: underline; }
.muted { color: var(--ink-4); }
.empty { padding: 56px 20px; text-align: center; color: var(--ink-4); font-size: 12.5px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: 11px; font-size: 11px; background: var(--surface-3); color: var(--ink-3);
  border: 1px solid var(--line-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--brand-soft); color: var(--brand-lo); border-color: transparent; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.tag { display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 4px; background: var(--surface-3); color: var(--ink-3); font-size: 11px; border: 1px solid var(--line); }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: 12px; color: var(--ink-3); }
.pager .pages { display: flex; align-items: center; gap: 6px; }
.pager button {
  min-width: 30px; height: 30px; border: 1px solid var(--line-2); background: #fff;
  border-radius: var(--r-xs); cursor: pointer; color: var(--ink-2);
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------- 详情弹窗（居中，替代原右侧抽屉） */
.mask {
  position: fixed; inset: 0; background: rgba(15,23,32,.34); z-index: 60;
  opacity: 0; transition: .18s;
}
.mask.show { opacity: 1; }
.drawer {
  position: fixed; left: 50%; top: 50%; width: min(920px, 92vw); max-height: 86vh;
  background: #fff; z-index: 61; display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(9,17,26,.28);
  opacity: 0; transform: translate(-50%, -47%) scale(.98); transition: .2s;
}
.drawer.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.drawer-head h3 { font-size: 16px; color: var(--ink-1); font-weight: 600; }
.drawer-head .sub { font-size: 12px; color: var(--ink-4); margin-top: 5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot {
  padding: 12px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0;
}
@media (max-width: 960px) {
  .drawer { width: 94vw; max-height: 90vh; }
  .drawer-body { padding: 16px 16px 20px; }
}
.icon-btn {
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-4);
  cursor: pointer; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink-1); }
.icon-btn svg { width: 17px; height: 17px; }

.section-title {
  font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .4px;
  margin: 22px 0 10px; display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: ''; width: 3px; height: 12px; background: var(--brand); border-radius: 2px; }
.section-title:first-child { margin-top: 0; }

.kv { display: grid; grid-template-columns: 84px 1fr; gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--ink-4); }
.kv dd { margin: 0; color: var(--ink-1); }

/* 只读详情：两列键值块（客户详情查看态） */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 28px; }
.kv-grid .k { font-size: 11.5px; color: var(--ink-4); margin-bottom: 5px; }
.kv-grid .v { font-size: 13px; color: var(--ink-1); line-height: 1.6; word-break: break-word; }
.kv-grid .span2 { grid-column: 1 / -1; }

/* 两列表单（编辑态），窄屏自动落单列 */
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 720px) {
  .kv-grid, .form-2col { grid-template-columns: 1fr; }
}

.mini-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini { background: var(--surface-3); border-radius: var(--r-md); padding: 11px 13px; }
.mini .k { font-size: 11px; color: var(--ink-4); }
.mini .v { font-size: 19px; font-weight: 600; color: var(--ink-1); margin-top: 4px; }

/* 转写气泡 */
.bubbles { display: flex; flex-direction: column; gap: 10px; }
.bubble { display: flex; gap: 9px; max-width: 86%; }
.bubble .who {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; font-size: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff; background: var(--ink-4);
}
.bubble .txt { background: var(--surface-3); border-radius: 3px 10px 10px 10px; padding: 8px 12px; line-height: 1.7; font-size: 12.5px; color: var(--ink-1); }
.bubble.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble.me .who { background: var(--brand); }
.bubble.me .txt { background: var(--brand-soft); border-radius: 10px 3px 10px 10px; }
.bubble .t { display: block; font-size: 10px; color: var(--ink-4); margin-top: 3px; }

audio { width: 100%; height: 38px; margin-top: 4px; }

/* ---------------------------------------------------------------- 弹窗 */
.modal {
  position: fixed; z-index: 71; top: 50%; left: 50%; transform: translate(-50%, -48%);
  width: 560px; max-width: 94vw; max-height: 86vh; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); display: flex; flex-direction: column; opacity: 0; transition: .18s;
}
.modal.show { opacity: 1; transform: translate(-50%, -50%); }
.modal.wide { width: 640px; }
.modal-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 15px; font-weight: 600; color: var(--ink-1); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal textarea {
  width: 100%; min-height: 150px; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-md); resize: vertical; outline: none; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.7;
}
.modal textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.file-drop {
  border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 18px; text-align: center;
  color: var(--ink-3); cursor: pointer; transition: .15s; font-size: 12.5px;
}
.file-drop:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.import-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-top: 12px; }
.import-sum b { font-size: 17px; display: block; }

/* 权限树 */
.perm-group { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; overflow: hidden; }
.perm-group-h { padding: 9px 13px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.perm-its { padding: 10px 13px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.perm-its label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.perm-its input { accent-color: var(--brand); }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink-1); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 12.5px;
  box-shadow: var(--sh-md); animation: tin .2s ease-out; max-width: 80vw;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #0d2a22; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

@media (max-width: 860px) {
  .login-left { display: none; }
  .side { width: 64px; padding: 14px 8px; }
  .side-brand-txt, .side-user-txt, .nav a span, .nav-label { display: none; }
  .nav a { justify-content: center; padding: 0; }
  .nav a.sub { padding-left: 0; }
  .main { margin-left: 64px; }
  .mini-cards { grid-template-columns: repeat(2, 1fr); }
}
