/* ===== 基础 ===== */
:root {
  --brand: #3370ff;
  --brand-dark: #245bdb;
  --brand-soft: #eaf0ff;
  --bg: #f5f6f7;
  --panel: #ffffff;
  --text: #1f2329;
  --text-2: #4e5969;
  --muted: #8f959e;
  --line: #e5e6eb;
  --line-soft: #f0f1f3;
  --danger: #f54a45;
  --ok: #34c724;
  --warn: #ff8800;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 35, 41, .04);
  --shadow: 0 4px 16px rgba(31, 35, 41, .07);
  --shadow-lg: 0 12px 40px rgba(31, 35, 41, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--brand); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.only-mobile { display: none; }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 500;
  border: 1px solid transparent; transition: .16s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #dfe8ff; }
.btn-danger { background: #fff; border-color: #ffd6d4; color: var(--danger); }
.btn-danger:hover { background: #fff2f1; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; height: 42px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.icon-btn:hover { background: var(--line-soft); }

/* ===== 登录 ===== */
.login-wrap {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 15% 0%, #e8efff 0%, rgba(232,239,255,0) 60%),
    radial-gradient(800px 500px at 90% 100%, #eef2ff 0%, rgba(238,242,255,0) 55%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--panel); border-radius: 16px;
  padding: 32px 30px 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-soft);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand h1 { font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
.login-brand p { font-size: 12.5px; margin-top: 3px; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--brand), #5b8cff);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(51, 112, 255, .28);
}
.logo-mark.sm { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; box-shadow: none; }
/* 官方红色徽标：去底色、圆形裁切、红色调阴影 */
.logo-mark.has-img {
  background: none; padding: 0; border-radius: 50%;
  box-shadow: 0 6px 16px rgba(184, 27, 37, .26);
}
.logo-mark.sm.has-img { box-shadow: none; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; outline: none; transition: .16s;
}
.field textarea { height: 74px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(51, 112, 255, .12);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-eye {
  position: absolute; right: 6px; top: 6px; width: 30px; height: 30px;
  border-radius: 7px; color: var(--muted); font-size: 15px;
}
.pw-eye:hover { background: var(--line-soft); }
.login-error {
  background: #fff2f1; color: var(--danger); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}
.login-foot { text-align: center; font-size: 12px; margin-top: 18px; }

/* ===== 顶栏 ===== */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; position: sticky; top: 0; z-index: 40; gap: 14px;
}
.topbar-left { display: flex; align-items: center; gap: 22px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; }
.tab {
  height: 32px; padding: 0 14px; border-radius: 8px; color: var(--text-2);
  font-weight: 500; transition: .15s;
}
.tab:hover { background: var(--line-soft); }
.tab.active { background: var(--brand-soft); color: var(--brand); }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box input {
  width: 300px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); padding: 0 32px 0 32px; outline: none; transition: .16s;
}
.search-box input:focus { background: #fff; border-color: var(--brand); width: 340px; }
.search-ico { position: absolute; left: 10px; color: var(--muted); font-size: 16px; pointer-events: none; }
.search-clear { position: absolute; right: 6px; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); }
.search-clear:hover { background: var(--line); }

.user-chip { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 20px; cursor: pointer; }
.user-chip:hover { background: var(--line-soft); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand);
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.uname { font-size: 13px; color: var(--text-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.user-menu {
  position: absolute; right: 0; top: 42px; width: 168px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 5px; z-index: 60;
}
.user-menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 7px; font-size: 13px; }
.user-menu button:hover { background: var(--line-soft); }
.user-menu button.danger { color: var(--danger); }

/* ===== 布局 ===== */
.layout { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 196px; flex: none; background: #fff; border-right: 1px solid var(--line);
  padding: 16px 10px; display: flex; flex-direction: column;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.side-title { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 0 10px 8px; letter-spacing: .4px; }
#catNav { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; text-align: left; width: 100%; transition: .14s;
}
.cat-item:hover { background: var(--line-soft); }
.cat-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.cat-item .ci { font-size: 15px; }
.cat-item .cn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .cc { font-size: 11.5px; color: var(--muted); }
.side-foot { margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid var(--line-soft); display: flex; gap: 16px; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 16px; font-weight: 600; }
.stat span { font-size: 11px; color: var(--muted); }

.content { flex: 1; min-width: 0; padding: 22px 26px 60px; overflow-x: hidden; }
.section-title { font-size: 15.5px; font-weight: 600; margin-bottom: 14px; letter-spacing: -.1px; }

/* ===== 链接卡片 ===== */
#navSections { display: flex; flex-direction: column; gap: 34px; }
.cat-block { scroll-margin-top: 74px; --cat: var(--brand); }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cat-head .cat-dot {
  width: 9px; height: 9px; border-radius: 3px; background: var(--cat); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 16%, transparent);
}
.cat-head h2 { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cat-head .cat-emoji { font-size: 16px; line-height: 1; }
.cat-head .count { font-size: 12px; color: var(--muted); background: var(--line-soft); padding: 2px 8px; border-radius: 20px; }
.link-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
}
.link-card {
  display: flex; align-items: flex-start; gap: 13px; background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 15px 15px 14px; transition: .18s; cursor: default; position: relative;
  box-shadow: var(--shadow-sm); min-width: 0;
}
.link-card::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--cat); opacity: 0; transition: .18s;
}
.link-card:hover { border-color: color-mix(in srgb, var(--cat) 35%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.link-card:hover::before { opacity: 1; }
.link-ico {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: color-mix(in srgb, var(--cat) 12%, #fff);
  color: var(--cat); font-size: 20px; display: flex; align-items: center; justify-content: center;
}
/* 官方品牌 logo：白底细描边，按原始比例居中（与 emoji 图标视觉重量对齐） */
.link-ico.has-img {
  background: #fff; padding: 7px;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.link-ico.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.link-card.admin-only .link-ico.has-img { background: #fff; }
.link-main { min-width: 0; flex: 1; padding-right: 6px; }
.link-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; letter-spacing: -.1px; }
.link-desc { font-size: 12.4px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { font-size: 10.5px; color: var(--cat); background: color-mix(in srgb, var(--cat) 10%, #fff); padding: 1px 6px; border-radius: 4px; font-weight: 500; }

.top-section { margin-bottom: 30px; }
.top-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.top-item {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; transition: .16s; min-width: 0;
}
.top-item:hover { border-color: #cfdcff; box-shadow: var(--shadow-sm); }
.top-item .ti-ico {
  width: 18px; height: 18px; flex: none; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.top-item .ti-ico.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.top-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 账号库 ===== */
.vault-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.vault-head .section-title { margin-bottom: 5px; }
#vaultGroups { display: flex; flex-direction: column; gap: 26px; margin-top: 20px; }
.vault-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.vault-group-head h3 { font-size: 14px; font-weight: 600; }
.vault-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.acc-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 15px; box-shadow: var(--shadow-sm); min-width: 0;
}
.acc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.acc-ico { width: 32px; height: 32px; border-radius: 9px; background: #fff4e8; color: #ff8800; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.acc-name { font-weight: 500; font-size: 13.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row { display: flex; align-items: center; gap: 8px; font-size: 12.8px; padding: 5px 0; min-width: 0; }
.acc-row .k { color: var(--muted); width: 46px; flex: none; font-size: 12px; }
.acc-row .v {
  flex: 1; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: var(--bg); border-radius: 6px; padding: 4px 8px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.acc-actions { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.acc-actions .btn { flex: none; }
.acc-empty-pw { color: var(--muted); font-style: italic; }
.notice { background: #fff8e6; border: 1px solid #ffe0a3; color: #8a6100; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-top: 14px; }
.bannner-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 20px; }

/* ===== 访问地址条（内网 / 外网，一键复制） ===== */
.addr-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 8px 10px 8px 14px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.addr-title { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; flex: none; }
.addr-item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--bg); border-radius: 8px; padding: 4px 4px 4px 8px;
}
.addr-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; flex: none; }
.addr-item.lan .addr-tag { color: #1f9d14; background: #e8f8e6; }
.addr-item.wan .addr-tag { color: var(--brand); background: #e9efff; }
.addr-url {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; user-select: all;
}
.addr-copy {
  height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500;
  color: var(--text-2); background: #fff; border: 1px solid var(--line);
  flex: none; transition: .14s;
}
.addr-copy:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.addr-copy.done { color: #1f9d14; border-color: #cdeccb; background: #f2fbf1; }

/* ===== 网址双入口（内网/外网） ===== */
.link-card { cursor: default; }
.link-access { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.access-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); transition: .14s;
}
.access-btn:hover { border-color: var(--brand); color: var(--brand); }
.access-btn .access-dot { width: 7px; height: 7px; border-radius: 50%; background: #c9cdd4; }
.access-btn.lan { color: #1f9d14; border-color: #cdeccb; background: #f2fbf1; }
.access-btn.lan .access-dot { background: #34c724; }
.access-btn.wan { color: var(--brand); border-color: #d3e0ff; background: #f2f6ff; }
.access-btn.wan .access-dot { background: var(--brand); }
.link-actions {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 6px;
  opacity: 0; transform: translateY(-2px); transition: .16s; z-index: 2;
}
.link-card:hover .link-actions,
.link-card:focus-within .link-actions { opacity: 1; transform: none; }
.link-act {
  width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); color: var(--text-2); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: .14s;
}
.link-act:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.link-act.danger:hover { color: var(--danger); border-color: #ffd6d4; background: #fff2f1; }
@media (hover: none) { .link-actions { opacity: 1; transform: none; } }

/* 管理员：仅「已对员工隐藏」时显示状态标签（去掉冗余的「员工可见」绿色标签） */
.link-vis-row { margin-top: 9px; display: flex; }
.link-vis {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted); transition: .14s;
}
.link-vis.off { color: #b26a00; border-color: #f0d9a8; background: #fff8ea; }
.link-vis:hover { filter: brightness(.97); box-shadow: var(--shadow-sm); }
.link-card.admin-only { border-style: dashed; border-color: #f0d9a8; background: #fffdf8; }
.link-card.admin-only .link-ico { background: #fdf2df; color: #b26a00; }

/* 管理员拖拽排序 */
.link-card.draggable { cursor: grab; }
.link-card.dragging { opacity: .45; cursor: grabbing; border-color: var(--brand); box-shadow: var(--shadow); }
.empty-drop {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px 12px;
  text-align: center; color: var(--muted); font-size: 12.5px; grid-column: 1 / -1;
}
.empty-drop:hover { border-color: var(--brand); color: var(--brand); }

/* ===== 系统卡片（一系统多账号） ===== */
.sys-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-width: 0; overflow: hidden;
}
.sys-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px 11px; border-bottom: 1px solid var(--line-soft); }
.sys-head .acc-name { font-weight: 600; }
.cred-list { display: flex; flex-direction: column; }
.cred-row { padding: 11px 15px; border-bottom: 1px dashed var(--line-soft); }
.cred-row:last-child { border-bottom: 0; }
.cred-row.locked { background: #fffaf2; }
.cred-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.cred-tag { font-size: 11px; color: var(--text-2); background: var(--line-soft); padding: 2px 8px; border-radius: 20px; }
.cred-tag.primary { color: #d9730d; background: #fff1e8; }
.cred-shop { font-size: 11px; color: #0f7bd9; background: #eaf4ff; padding: 2px 8px; border-radius: 20px; }
.cred-lock { font-size: 11px; color: #b26a00; background: #fff4e5; padding: 2px 8px; border-radius: 20px; }
.badge.lock { background: #fff4e5; color: #b26a00; }

/* ===== 弹窗复选框 ===== */
.check-field .check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.check-field .chk { width: 16px; height: 16px; accent-color: var(--brand); }

/* ===== 管理 ===== */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.atab { padding: 10px 14px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.atab:hover { color: var(--brand); }
.atab.active { color: var(--brand); border-bottom-color: var(--brand); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-toolbar h3 { font-size: 14.5px; font-weight: 600; }
.table { width: 100%; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; background: #fafbfc; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbfc; }
.table .cell-url { color: var(--muted); font-size: 12.3px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .ops { display: flex; gap: 6px; justify-content: flex-end; }
.table .cell-name { display: flex; align-items: center; gap: 8px; }
.table .tbl-ico {
  width: 18px; height: 18px; flex: none; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.table .tbl-ico.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--line-soft); color: var(--text-2); }
.badge.admin { background: #fff1e8; color: #d9730d; }
.badge.ok { background: #e8f8e6; color: #1f9d14; }
.badge.off { background: #f2f3f5; color: var(--muted); }
.audit-action { font-family: Consolas, monospace; font-size: 12px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(31, 35, 41, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .16s ease;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .18s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 4px 20px 8px; overflow-y: auto; }
.modal-foot { padding: 14px 20px 18px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px) } to { opacity: 1; transform: none } }

.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  background: #1f2329; color: #fff; padding: 10px 18px; border-radius: 9px;
  font-size: 13px; z-index: 200; box-shadow: var(--shadow); animation: fade .16s ease;
}
.toast.err { background: #e33e38; }
.toast.ok { background: #1f2329; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-ico { font-size: 34px; margin-bottom: 10px; opacity: .7; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .only-mobile { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 58px; bottom: 0; z-index: 50; width: 220px;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
    height: auto;
  }
  .sidebar.open { transform: none; }
  .content { padding: 16px 14px 50px; }
  .tabs { gap: 0; }
  .tab { padding: 0 10px; }
  .brand span { display: none; }
  .uname { display: none; }
  .search-box input { width: 150px; }
  .search-box input:focus { width: 190px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-left { gap: 8px; }
  .login-card { padding: 26px 22px 20px; }
}
@media (max-width: 560px) {
  .link-grid { grid-template-columns: 1fr; }
  .vault-grid { grid-template-columns: 1fr; }
  .search-box { display: none; }
  .top-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-toolbar { flex-direction: column; align-items: flex-start; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .addr-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .addr-item { width: 100%; }
  .addr-url { flex: 1; }
}
