/* ============================================================
   密码记事本 · 样式表
   类名与视觉规范沿用 UI 设计稿，去掉了展示用的外壳部分。
   真实应用在手机上全屏显示，在桌面上限制为 430px 宽的居中面板。
   ============================================================ */

:root {
  --p700: #5B3FD6;
  --p600: #6D4AE0;
  --p500: #7C5CFF;
  --p400: #9B82FF;
  --p200: #C9BCFF;
  --p100: #EDE9FE;
  --p50: #F5F3FF;
  --bg: #F4F2FA;
  --card: #FFFFFF;
  --t1: #1B1730;
  --t2: #6B6880;
  --t3: #A5A1B8;
  --bd: #ECE9F4;
  --green: #10B981;
  --green-bg: #E7F8F1;
  --red: #EF4444;
  --red-bg: #FEECEC;
  --amber: #D97706;
  --amber-bg: #FEF3E2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--t1);
  background: #E9E6F2;
  -webkit-font-smoothing: antialiased;
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 480px) {
  .app {
    box-shadow: 0 24px 60px -20px rgba(38, 20, 90, .35);
    border-radius: 0;
  }
}

/* 图标 */
.ic {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.ic.s { width: 14px; height: 14px; }
.ic.l { width: 20px; height: 20px; }

/* ---------- 视图容器 ---------- */
.view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.view.on { display: flex; }

/* ---------- 导航 ---------- */
.navbar {
  height: 52px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; position: relative; z-index: 12;
}
.navbar .nav-title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 15px; font-weight: 600; pointer-events: none;
}
.navbar .nav-btn {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; color: var(--t1);
  position: relative; z-index: 2; background: none; border: 0; cursor: pointer;
}
.navbar .nav-btn:active { background: rgba(0, 0, 0, .05); }
.navbar .nav-text {
  font-size: 12.5px; color: var(--p600); font-weight: 600;
  position: relative; z-index: 2; background: none; border: 0; cursor: pointer;
}
.navbar .nav-text:disabled { color: var(--t3); cursor: default; }
.navbar.solid { background: #fff; border-bottom: 1px solid var(--bd); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 16px; flex: none;
}
.topbar .tl { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.topbar .tl .mark {
  width: 26px; height: 26px; border-radius: 9px;
  background: linear-gradient(140deg, #9B82FF, #6D4AE0);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 10px rgba(109, 74, 224, .3);
}
.topbar .tr { display: flex; align-items: center; gap: 9px; }
.topbar .user {
  font-size: 11.5px; color: var(--t2); background: #fff;
  border: 1px solid var(--bd); padding: 5px 10px; border-radius: 999px;
}

.body { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; min-height: 0; -webkit-overflow-scrolling: touch; }
.body.pad { padding: 0 16px; }
.body.scroll { padding-bottom: 110px; }

/* ---------- 按钮 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; border-radius: 14px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  background: linear-gradient(135deg, #8B6CFF, #6D4AE0); color: #fff;
  box-shadow: 0 8px 18px -4px rgba(109, 74, 224, .45);
  letter-spacing: .3px; border: 0; cursor: pointer; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.line { background: #fff; color: var(--p600); border: 1.5px solid #DDD5FF; box-shadow: none; }
.btn.gray { background: #F1EFF8; color: var(--t2); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #F26B6B, #DC2626); box-shadow: 0 8px 18px -4px rgba(220, 38, 38, .4); }
.btn.sm { height: 36px; border-radius: 10px; font-size: 12.5px; }

/* ---------- 输入 ---------- */
.field {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px; background: #fff;
  border: 1.5px solid var(--bd); border-radius: 14px;
  font-size: 13.5px; color: var(--t1);
}
.field .pre {
  font-size: 13px; color: var(--t2); padding-right: 10px;
  border-right: 1px solid var(--bd); font-weight: 500;
}
.field .suffix {
  font-size: 12px; color: var(--p600); font-weight: 600;
  padding-left: 10px; border-left: 1px solid var(--bd);
  background: none; border-top: 0; border-right: 0; border-bottom: 0;
  cursor: pointer; font-family: inherit;
}
.field .suffix.off { color: var(--t3); font-weight: 500; cursor: default; }
.field.focus { border-color: var(--p400); box-shadow: 0 0 0 4px rgba(124, 92, 255, .1); }
.field.err { border-color: #F3B1B1; box-shadow: 0 0 0 4px rgba(239, 68, 68, .08); }

.field input,
.form-item .in input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; font: inherit; color: inherit;
  letter-spacing: inherit;
}
.field input::placeholder,
.form-item .in input::placeholder { color: var(--t3); font-weight: 400; letter-spacing: normal; }

.form-item { margin-bottom: 13px; }
.form-item .lb {
  font-size: 11.5px; color: var(--t2); font-weight: 600;
  margin-bottom: 7px; display: flex; align-items: center;
}
.form-item .lb i { color: var(--red); font-style: normal; margin-left: 2px; }
.form-item .lb .opt { margin-left: auto; font-weight: 400; color: var(--t3); font-size: 10.5px; }
.form-item .in {
  display: flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 14px; background: #fff;
  border: 1.5px solid var(--bd); border-radius: 13px;
  font-size: 13px; color: var(--t1);
}
.form-item .in.on { border-color: var(--p400); box-shadow: 0 0 0 4px rgba(124, 92, 255, .1); }

/* 整段粘贴被自动识别后，对应的输入框闪一下 ——
   让用户一眼看清哪几个值是从那段文本里拆出来的 */
@keyframes flashFill {
  0%, 55% { background: var(--p50); border-color: var(--p400); box-shadow: 0 0 0 4px rgba(124, 92, 255, .14); }
  100% { background: #fff; border-color: var(--bd); box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}
.form-item .in.flash-fill { animation: flashFill 1.7s ease-out; }

/* 表单顶部的「可以整段粘贴」提示 */
.paste-tip {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--p50); border: 1px solid var(--p100); border-radius: 12px;
  font-size: 11.5px; line-height: 1.6; color: var(--t2);
}
.paste-tip svg { flex: 0 0 auto; margin-top: 1px; color: var(--p500); }
.paste-tip b { font-weight: 600; color: var(--p700); }
.form-item .in .tail { color: var(--t3); margin-left: auto; display: flex; gap: 8px; align-items: center; background: none; border: 0; cursor: pointer; padding: 4px; }
.form-item .in .tail.ok { color: var(--green); }
.form-item textarea {
  display: block; width: 100%; min-height: 74px; padding: 12px 14px;
  background: #fff; border: 1.5px solid var(--bd); border-radius: 13px;
  font-size: 12.5px; color: var(--t1); line-height: 1.6;
  font-family: inherit; resize: vertical; outline: 0;
}
.form-item textarea:focus { border-color: var(--p400); box-shadow: 0 0 0 4px rgba(124, 92, 255, .1); }

/* ---------- 强度条 ---------- */
.strength { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: 10.5px; color: var(--t2); }
.strength .bars { display: flex; gap: 4px; flex: 1; }
.strength .bars i { height: 4px; flex: 1; border-radius: 2px; background: #EDEBF3; }
.strength.lv1 .bars i:nth-child(1) { background: var(--red); }
.strength.lv1 .lv { color: var(--red); }
.strength.lv2 .bars i:nth-child(-n+2) { background: var(--amber); }
.strength.lv2 .lv { color: var(--amber); }
.strength.lv3 .bars i:nth-child(-n+3) { background: #34C759; }
.strength.lv3 .lv { color: #34C759; }
.strength.lv4 .bars i { background: var(--green); }
.strength.lv4 .lv { color: var(--green); }
.strength .lv { font-weight: 600; }

/* ---------- 提示条 ---------- */
.tip {
  display: flex; gap: 9px; padding: 12px 13px; border-radius: 13px;
  background: var(--p50); border: 1px solid #E6DFFF;
  font-size: 11px; line-height: 1.6; color: #5A4E8C;
}
.tip svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--p500); }
.tip.warn { background: var(--amber-bg); border-color: #FBE3C0; color: #95610E; }
.tip.warn svg { color: var(--amber); }
.tip.gray { background: #fff; border-color: var(--bd); color: var(--t2); }
.tip.gray svg { color: var(--t3); }
.tip.danger { background: var(--red-bg); border-color: #F8D4D4; color: #B02A2A; }
.tip.danger svg { color: var(--red); }
.tip b { color: inherit; }

/* ---------- 搜索与分类 ---------- */
.searchbar {
  display: flex; align-items: center; gap: 9px;
  height: 42px; margin: 0 16px; padding: 0 14px;
  background: #fff; border-radius: 13px;
  box-shadow: 0 2px 10px rgba(50, 30, 120, .05);
  color: var(--t3); font-size: 13px;
}
.searchbar .mk { color: var(--p400); display: grid; place-items: center; }
.searchbar input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--t1);
}

.chips { display: flex; gap: 8px; padding: 14px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--bd);
  font-size: 12px; color: var(--t2); white-space: nowrap;
  font-family: inherit; cursor: pointer;
}
.chip.on {
  background: linear-gradient(135deg, #8B6CFF, #6D4AE0);
  color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: 0 5px 12px -2px rgba(109, 74, 224, .4);
}
.chip b { font-weight: 600; opacity: .65; font-size: 11px; margin-left: 3px; }

/* ---------- 密码卡片 ---------- */
.pcard {
  background: #fff; border-radius: 18px; padding: 13px 14px 11px;
  box-shadow: 0 4px 16px rgba(50, 30, 120, .06);
  margin-bottom: 10px; border: 1px solid #F1EFF8;
  cursor: pointer;
}
.pcard:active { background: #FCFBFE; }
.pc-head { display: flex; align-items: center; gap: 11px; }
.pc-ico {
  width: 36px; height: 36px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--p100); color: var(--p600);
  border: 1px solid rgba(124, 92, 255, .14);
}
.pc-ico svg { width: 18px; height: 18px; }
.pc-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; word-break: break-all; }
.pc-sub { font-size: 10.5px; color: var(--t3); margin-top: 3px; word-break: break-all; }
.pc-head .chev { margin-left: auto; color: #CFCBE0; }
.pc-body { margin-top: 11px; padding-top: 10px; border-top: 1px dashed #EFEDF6; }
.pc-line { display: flex; align-items: center; gap: 8px; height: 27px; }
.pc-line .k { font-size: 11px; color: var(--t3); width: 26px; flex: none; }
.pc-line .v {
  font-size: 12.5px; color: var(--t1); font-weight: 500;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1;
}
.pc-line .v.mono { letter-spacing: 2px; font-size: 13px; color: var(--t2); }
.pc-line .mini {
  flex: none; display: flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--p600); font-weight: 600;
  background: var(--p50); padding: 4px 8px; border-radius: 7px;
  border: 0; font-family: inherit; cursor: pointer;
}
.pc-line .mini svg { width: 11px; height: 11px; }
.pc-line .mini.plain { background: transparent; padding: 4px; color: var(--t3); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.pc-foot .up { font-size: 10.5px; color: var(--t3); }
.pc-foot .share {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--p600);
  padding: 5px 12px; border-radius: 9px;
  background: var(--p50); border: 1px solid #E6DFFF;
  font-family: inherit; cursor: pointer;
}
.pc-foot .share svg { width: 12px; height: 12px; }

/* ---------- 底部悬浮 ---------- */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
  background: linear-gradient(to top, var(--bg) 42%, rgba(244, 242, 250, 0));
  z-index: 14;
}
.dock .btn { flex: 1; height: 48px; border-radius: 15px; }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(26, 18, 50, .42);
  backdrop-filter: blur(3px); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 0 22px;
}
.modal {
  width: 100%; max-width: 380px; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 24px; padding: 18px 18px 16px;
  box-shadow: 0 26px 55px -14px rgba(20, 10, 50, .5);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head b { font-size: 15px; font-weight: 700; }
.modal-head .x {
  width: 26px; height: 26px; border-radius: 9px;
  background: #F4F3F9; display: grid; place-items: center;
  color: var(--t2); border: 0; cursor: pointer;
}
.subj {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 14px; background: var(--p50);
  border: 1px solid #E9E3FF; margin-bottom: 16px;
}
.subj .pc-ico { width: 32px; height: 32px; border-radius: 10px; }
.subj .pc-name { font-size: 13px; }
.mlabel { font-size: 11.5px; font-weight: 600; color: var(--t2); margin: 0 0 8px; display: flex; align-items: center; }
.mlabel span { margin-left: auto; font-weight: 500; font-size: 10.5px; color: var(--t3); }
.mgroup { margin-bottom: 15px; }
.modal-foot { display: flex; gap: 10px; margin-top: 4px; }
.modal-foot .btn { flex: 1; height: 44px; font-size: 13.5px; }
.confirm-text { font-size: 13px; line-height: 1.7; color: var(--t2); margin-bottom: 18px; }

/* ---------- CSV 导入 ---------- */
.import-modal { max-width: 400px; }
.import-body { margin-bottom: 16px; }
.import-file {
  font-size: 11.5px; color: var(--t3); word-break: break-all; margin-bottom: 10px;
}
.import-summary {
  border-radius: 14px; background: var(--p50); border: 1px solid #E9E3FF;
  padding: 9px 12px; margin-bottom: 12px;
}
.import-summary .stat { display: flex; align-items: center; font-size: 12px; line-height: 1.9; }
.import-summary .k { color: var(--t2); }
.import-summary .v { margin-left: auto; font-weight: 700; }
.import-summary .v.ok { color: var(--p700); }
.import-summary .v.mute { color: var(--t3); font-weight: 600; }

.import-list {
  max-height: 190px; overflow-y: auto;
  border-radius: 14px; border: 1px solid var(--bd); background: #FCFCFE;
}
.import-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; font-size: 12px; border-bottom: 1px solid var(--bd);
}
.import-item:last-child { border-bottom: 0; }
.import-item b {
  font-weight: 600; max-width: 48%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.import-item .u {
  color: var(--t2); font-size: 11.5px; max-width: 34%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.import-item .pw {
  margin-left: auto; flex: none; font-size: 9px;
  letter-spacing: 1px; color: var(--t3);
}
.import-more { padding: 9px 11px; font-size: 11.5px; color: var(--t3); text-align: center; }

.import-warn {
  margin-top: 10px; padding: 9px 11px; border-radius: 12px;
  background: #FFF7E8; border: 1px solid #FCE3B4;
  font-size: 11.5px; line-height: 1.7; color: #8A5A12;
}

.import-bar { height: 8px; border-radius: 999px; background: #EFECF8; overflow: hidden; }
.import-fill {
  width: 0; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--p400), var(--p600));
  transition: width .18s ease-out;
}
.import-status {
  margin-top: 10px; font-size: 12px; color: var(--t2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 弹窗内的单行输入（分享备注等） */
.minput {
  display: flex; align-items: center; gap: 9px; height: 44px;
  padding: 0 14px; background: #fff;
  border: 1.5px solid var(--bd); border-radius: 13px;
}
.minput input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  font: inherit; font-size: 13px; background: transparent;
}
.minput input::placeholder { color: var(--t3); }

/* 分享记录顶部的状态筛选 */
.share-filter { margin-bottom: 14px; }

.pills { display: flex; gap: 7px; }
.pill {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 11px;
  background: #fff; border: 1.5px solid var(--bd);
  font-size: 11.5px; color: var(--t2);
  font-family: inherit; cursor: pointer;
}
.pill.on {
  background: linear-gradient(135deg, #8B6CFF, #6D4AE0);
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 5px 12px -3px rgba(109, 74, 224, .5);
}

/* ---------- 提取码 ---------- */
.code-card {
  background: linear-gradient(150deg, #7C5CFF, #5B3FD6);
  border-radius: 22px; padding: 22px 18px; color: #fff; text-align: center;
  box-shadow: 0 18px 34px -12px rgba(91, 63, 214, .6);
  position: relative; overflow: hidden;
}
.code-card:after {
  content: ""; position: absolute; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255, 255, 255, .09);
  top: -90px; right: -50px;
}
.code-label { font-size: 11px; letter-spacing: 2px; opacity: .75; margin-bottom: 10px; }
.code-value {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 27px; font-weight: 700; letter-spacing: 2.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.code-meta { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 11px; opacity: .9; }
.code-meta span { display: flex; align-items: center; gap: 4px; }
.code-meta svg { width: 12px; height: 12px; }
.code-copy {
  margin-top: 16px; height: 40px; border-radius: 12px; width: 100%;
  background: rgba(255, 255, 255, .92); color: var(--p600);
  font-size: 12.5px; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  position: relative; z-index: 2; border: 0; cursor: pointer;
}

.linkbox {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; background: #fff; border: 1px solid var(--bd);
  border-radius: 13px; font-size: 11.5px; color: var(--t2);
}
.linkbox .u {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: ui-monospace, monospace; font-size: 11px;
}
.linkbox .cp {
  color: var(--p600); font-weight: 700; font-size: 11.5px; flex: none;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}

.cells { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0 auto; }
.cell {
  width: 30px; height: 42px; border-radius: 11px;
  background: #fff; border: 1.5px solid var(--bd);
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700; font-family: ui-monospace, monospace;
  color: var(--t1);
}
.cell.on { border-color: var(--p500); background: var(--p50); color: var(--p600); box-shadow: 0 0 0 4px rgba(124, 92, 255, .1); }
.cells .dash { width: 12px; height: 2px; background: #D9D5E8; border-radius: 2px; margin: 0 1px; }

/* ---------- 设置与列表行 ---------- */
.profile {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border-radius: 18px; padding: 15px;
  box-shadow: 0 4px 16px rgba(50, 30, 120, .06);
}
.avatar {
  width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(140deg, #9B82FF, #6D4AE0);
  display: grid; place-items: center; color: #fff;
  font-size: 17px; font-weight: 700; flex: none;
}
.grp { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(50, 30, 120, .06); margin-top: 14px; }
.grp .gl {
  font-size: 11px; color: var(--t3); font-weight: 600; letter-spacing: .6px;
  padding: 0 20px; margin: 18px 0 8px; display: block;
}
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #F4F2FA;
  font-size: 13px; width: 100%; background: none; border-left: 0;
  border-right: 0; border-top: 0; font-family: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row .ri {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--p50); color: var(--p600); flex: none;
}
.row .ri.g { background: #EEF6FF; color: #3B82F6; }
.row .ri.a { background: var(--amber-bg); color: var(--amber); }
.row .rt { flex: 1; }
.row .rv { font-size: 11.5px; color: var(--t3); }
.row .chev { color: #D2CEDF; width: 14px; height: 14px; }
.row.danger { color: var(--red); font-weight: 600; justify-content: center; }
.row.danger .ri { background: var(--red-bg); color: var(--red); }

/* ---------- 详情 ---------- */
.dfield { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #F4F2FA; }
.dfield:last-child { border-bottom: 0; }
.dfield .dk { width: 48px; flex: none; font-size: 11.5px; color: var(--t3); }
.dfield .dv {
  flex: 1; font-size: 12.5px; color: var(--t1);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.dfield .dv.mono { letter-spacing: 2px; color: var(--t2); }
.dfield .da { flex: none; display: flex; gap: 6px; align-items: center; color: var(--p600); font-size: 11px; font-weight: 600; }
.dfield .da button {
  color: var(--p600); font-size: 11px; font-weight: 600;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 3px; padding: 4px;
}

/* ---------- 分享记录 ---------- */
.scard {
  background: #fff; border-radius: 18px; padding: 14px;
  box-shadow: 0 4px 16px rgba(50, 30, 120, .06);
  margin-bottom: 11px; border: 1px solid #F1EFF8;
}
.scard .sh { display: flex; align-items: center; gap: 9px; }
.scard .sh b { font-size: 13.5px; font-weight: 600; }
.scard .sh-sub { font-size: 10.5px; color: var(--t3); margin-top: 3px; }
.scard .code-row {
  display: flex; align-items: center; gap: 8px; margin-top: 11px;
  padding: 9px 11px; background: var(--p50); border-radius: 11px;
  border: 1px dashed #DAD0FF;
}
.scard .code-row .cc {
  font-family: ui-monospace, monospace; font-size: 14px; font-weight: 700;
  letter-spacing: 1.4px; color: var(--p600); flex: 1;
}
.scard .code-row .cp {
  display: flex; align-items: center; gap: 4px; font-size: 11px;
  color: var(--p600); font-weight: 600; background: none; border: 0;
  cursor: pointer; font-family: inherit;
}
.scard .meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--t2); flex-wrap: wrap; }
.scard .rm { margin-top: 8px; font-size: 11px; color: var(--t3); }
.scard .acts { display: flex; gap: 8px; margin-top: 12px; }
.scard .acts .b {
  flex: 1; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; font-family: inherit;
  border: 0; cursor: pointer;
}
.scard .acts .b.rev { background: var(--p50); color: var(--p600); border: 1px solid #E6DFFF; }
.scard .acts .b.del { background: #F5F4FA; color: var(--t2); }
.scard .acts .b:disabled { background: #FAF9FC; color: #C7C3D6; cursor: default; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); }
.dot.gray { background: var(--t3); }
.dot.red { background: var(--red); }
.dot.amber { background: var(--amber); }

.tabs { display: flex; gap: 6px; background: #EFEDF7; padding: 4px; border-radius: 12px; margin: 0 16px 14px; }
.tabs button {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 9px;
  font-size: 12px; color: var(--t2); background: none; border: 0;
  font-family: inherit; cursor: pointer;
}
.tabs button.on { background: #fff; color: var(--p600); font-weight: 600; box-shadow: 0 2px 6px rgba(50, 30, 120, .09); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 30px; color: var(--t3); }
.empty .ico {
  width: 62px; height: 62px; border-radius: 20px;
  background: #fff; display: grid; place-items: center;
  margin: 0 auto 16px; color: var(--p200);
  box-shadow: 0 6px 18px rgba(50, 30, 120, .06);
}
.empty .ico svg { width: 28px; height: 28px; }
.empty b { display: block; font-size: 13.5px; color: var(--t2); font-weight: 600; margin-bottom: 6px; }
.empty p { font-size: 11.5px; line-height: 1.7; }

/* ---------- 恢复码 ---------- */
.recovery-box {
  background: #fff; border: 1.5px dashed var(--p200); border-radius: 16px;
  padding: 16px; margin: 4px 0 12px;
}
.recovery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px 10px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 700; color: var(--p700); letter-spacing: .5px;
  text-align: center;
}
.recovery-check { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; color: var(--t2); line-height: 1.6; margin-top: 14px; }
.recovery-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--p500); flex: none; }

/* ---------- 轻提示 ---------- */
.toast-host {
  position: fixed; left: 0; right: 0; bottom: 90px;
  display: flex; justify-content: center; z-index: 90; pointer-events: none;
}
.toast {
  max-width: 300px; padding: 11px 18px; border-radius: 13px;
  font-size: 12.5px; line-height: 1.5; text-align: center;
  background: rgba(27, 23, 48, .93); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(20, 10, 50, .5);
  animation: toast-in .18s ease-out;
}
.toast.out { opacity: 0; transition: opacity .2s; }
.toast-success { background: rgba(12, 122, 84, .95); }
.toast-error { background: rgba(178, 35, 35, .95); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 其它 ---------- */
.or { display: flex; align-items: center; gap: 10px; margin: 22px 0 16px; color: var(--t3); font-size: 11px; }
.or:before, .or:after { content: ""; height: 1px; background: var(--bd); flex: 1; }
.footnote { text-align: center; font-size: 11px; color: var(--t3); line-height: 1.7; }
.center { text-align: center; }
.muted { color: var(--t2); }
.hidden { display: none !important; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 76px; border-radius: 18px; background: linear-gradient(90deg, #F3F1F9 25%, #EAE7F4 37%, #F3F1F9 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 成员管理 ---------- */

/* 胶囊标签。设置页的角色标签一直在用 class="tag"，但样式表里从来没有定义过，
   之前渲染出来就是一行素文本，跟周围的说明文字糊在一起。这里补上。 */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 600; line-height: 1.5;
  background: #F4F3F9; color: var(--t2); flex: none;
}
.tag.adm { background: var(--p100); color: var(--p700); }
.tag.me { background: #EEF6FF; color: #3B82F6; }
.tag.off { background: var(--amber-bg); color: var(--amber); }

.mcard {
  background: #fff; border-radius: 18px; padding: 14px;
  box-shadow: 0 4px 16px rgba(50, 30, 120, .06);
  margin-bottom: 11px; border: 1px solid #F1EFF8;
}
.mcard .mh { display: flex; align-items: flex-start; gap: 11px; }
.mavatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  font-size: 15px; font-weight: 700;
  background: linear-gradient(140deg, #9B82FF, #6D4AE0);
}
.mavatar.off { background: #D5D1E3; }
.mcard .mi { flex: 1; min-width: 0; }
.mcard .mi-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mcard .mi-name b { font-size: 13.5px; font-weight: 600; }
.mcard .mi-sub { font-size: 11px; color: var(--t2); margin-top: 4px; word-break: break-all; }
.mcard .mi-meta { font-size: 10.5px; color: var(--t3); margin-top: 4px; line-height: 1.6; }
.mcard .macts { display: flex; gap: 8px; margin-top: 12px; }
.mcard .macts .b {
  flex: 1; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; font-family: inherit;
  border: 0; cursor: pointer;
}
.mcard .macts .b.reset { background: var(--p50); color: var(--p600); border: 1px solid #E6DFFF; }
.mcard .macts .b.kick { background: var(--amber-bg); color: var(--amber); }
.mcard .macts .b.dis { background: var(--red-bg); color: var(--red); }
.mcard .macts .b.en { background: var(--green-bg); color: var(--green); }
.mcard .macts .b:disabled { background: #FAF9FC; color: #C7C3D6; cursor: default; }

/* 初始口令展示卡 */
.pwcard {
  background: linear-gradient(150deg, #7C5CFF, #5B3FD6);
  border-radius: 18px; padding: 18px 16px; color: #fff; text-align: center;
  box-shadow: 0 14px 28px -12px rgba(91, 63, 214, .55);
}
.pwlabel { font-size: 10.5px; letter-spacing: 2px; opacity: .78; margin-bottom: 9px; }
.pwvalue {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 1.6px; word-break: break-all;
}
.pwcopy {
  margin-top: 14px; height: 38px; border-radius: 11px; width: 100%;
  background: rgba(255, 255, 255, .92); color: var(--p600);
  font-size: 12.5px; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer;
}

/* 操作记录 */
.arow {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border-radius: 14px; padding: 12px 13px;
  margin-bottom: 8px; border: 1px solid #F1EFF8;
  box-shadow: 0 3px 12px rgba(50, 30, 120, .05);
}
.arow .dot { margin-top: 6px; flex: none; }
.arow .amain { flex: 1; min-width: 0; }
.arow .atitle { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.arow .atitle b { font-size: 12.5px; font-weight: 600; }
.arow .atarget {
  font-size: 10.5px; color: var(--p600); background: var(--p50);
  padding: 2px 7px; border-radius: 6px; font-weight: 600;
}
.arow .asub { font-size: 10.5px; color: var(--t3); margin-top: 4px; word-break: break-all; }

/* tabs 已经位于 .body.pad 内，去掉自带外边距以免双重缩进 */
#member-tabs { margin: 0 0 14px; }
