/* ==========================================================
   部署手册系统 · UI 2.0
   ========================================================== */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #0f172a;
  --text-2: #3b4658;
  --muted: #7b879b;
  --muted-2: #94a3b8;
  --line: #e7ecf4;
  --line-strong: #d6ddea;

  --brand: #5b6dfa;
  --brand-2: #7c5cf5;
  --brand-dark: #4353e0;
  --brand-soft: #eef1ff;
  --brand-soft-2: #e3e8ff;

  --success: #0ea472;
  --success-soft: #e8f8f1;
  --warning: #d97706;
  --warning-soft: #fff6e6;
  --danger: #dc3d43;
  --danger-soft: #fdeced;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 4px 12px -4px rgba(15, 23, 42, .08);
  --shadow: 0 12px 32px -16px rgba(15, 23, 42, .18);
  --shadow-lg: 0 32px 70px -24px rgba(15, 23, 42, .35);

  --sidebar-w: 262px;
  --sidebar-w-collapsed: 80px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: rgba(91, 109, 250, .22); }

.ico { flex: none; display: block; }

/* ==========================================================
   侧栏
   ========================================================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  color: #cbd5e1;
  background:
    radial-gradient(420px 240px at 0% 0%, rgba(99, 102, 241, .28), transparent 68%),
    radial-gradient(360px 260px at 100% 100%, rgba(14, 165, 233, .14), transparent 66%),
    linear-gradient(180deg, #111b33 0%, #0b1326 100%);
  border-right: 1px solid rgba(148, 163, 184, .12);
  transition: width .26s cubic-bezier(.4, 0, .2, 1);
  overflow: visible;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 100% 46px;
  mask-image: linear-gradient(180deg, #000, transparent 55%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.brand:hover { color: #fff; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #6d7bff, #8b5cf6);
  box-shadow: 0 8px 20px -6px rgba(109, 123, 255, .75);
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 10px; }

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  white-space: nowrap;
  transition: opacity .16s;
}
.brand-text strong { font-size: 16px; letter-spacing: .02em; font-weight: 700; }
.brand-text small { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #8fa0bd; margin-top: 1px; }

.sidebar-toggle {
  position: absolute;
  top: 76px;
  right: -13px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dfe5ef;
  background: #fff;
  color: #64748b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
  transition: transform .26s, color .15s;
}
.sidebar-toggle:hover { color: var(--brand); }
html.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-nav { position: relative; z-index: 1; padding-top: 4px; }

.nav-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b7c99;
  padding: 10px 12px 8px;
  white-space: nowrap;
  transition: opacity .16s;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 43px;
  margin: 3px 2px;
  padding: 0 13px;
  border-radius: 11px;
  color: #b6c2d6;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(148, 163, 184, .10); color: #fff; }

.nav-item.is-active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(99, 102, 241, .34), rgba(99, 102, 241, .12));
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .28);
}
.nav-item.is-active .nav-icon { color: #a5b4fc; }

.nav-icon { flex: none; display: grid; place-items: center; color: #8494ad; }
.nav-text { transition: opacity .16s; }

.sidebar-recent {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding-top: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .25) transparent;
}
.sidebar-recent::-webkit-scrollbar { width: 5px; }
.sidebar-recent::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .25); border-radius: 8px; }
.sidebar-recent::before {
  content: "";
  display: block;
  height: 1px;
  margin: 10px 12px 6px;
  background: rgba(148, 163, 184, .13);
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  margin: 1px 2px;
  border-radius: 9px;
  color: #93a2ba;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.recent-item:hover { background: rgba(148, 163, 184, .09); color: #eef2ff; }
.recent-item.is-current { background: rgba(99, 102, 241, .16); color: #e0e7ff; }
.recent-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #52658a; }
.recent-item.is-current .recent-dot { background: #a5b4fc; box-shadow: 0 0 0 3px rgba(129, 140, 248, .18); }
.recent-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-count {
  flex: none;
  font-size: 10.5px;
  min-width: 20px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 20px;
  color: #8fa0bd;
  background: rgba(148, 163, 184, .12);
}
.recent-empty { padding: 6px 12px 10px; font-size: 12.5px; color: #5f708e; }

/* 侧栏层级菜单：项目列表 → 项目 → 应用 → 手册 */
.sidebar-tree {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding-top: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .25) transparent;
}
.sidebar-tree::-webkit-scrollbar { width: 5px; }
.sidebar-tree::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .25); border-radius: 8px; }
.sidebar-tree::before {
  content: "";
  display: block;
  height: 1px;
  margin: 10px 12px 6px;
  background: rgba(148, 163, 184, .13);
}

.tree-node { position: relative; }

.tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 1px 2px;
  border-radius: 9px;
}
.tree-row:hover { background: rgba(148, 163, 184, .07); }

.tree-toggle,
.tree-spacer { flex: none; width: 20px; height: 20px; }

.tree-toggle {
  display: grid;
  place-items: center;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7c99;
  transition: background .15s, color .15s;
}
.tree-toggle:hover { background: rgba(148, 163, 184, .18); color: #e2e8f0; }
.tree-toggle svg { transition: transform .18s ease; }
.tree-node.is-open > .tree-row .tree-toggle svg { transform: rotate(90deg); }

.tree-link {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  padding: 6px 8px 6px 4px;
  border-radius: 9px;
  color: #93a2ba;
  font-size: 13px;
  line-height: 1.35;
  transition: background .15s, color .15s;
}
.tree-link:hover { color: #eef2ff; }
.tree-link.is-current { color: #e0e7ff; background: rgba(99, 102, 241, .18); }
.tree-link.is-root { font-size: 13.5px; font-weight: 600; color: #c3cee0; }
.tree-link.is-root.is-current { color: #fff; }
.tree-icon { flex: none; display: grid; place-items: center; color: #7b8cab; }
.tree-link.is-current .tree-icon { color: #a5b4fc; }
.tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
  flex: none;
  font-size: 10.5px;
  min-width: 18px;
  text-align: center;
  padding: 1px 5px;
  border-radius: 20px;
  color: #8fa0bd;
  background: rgba(148, 163, 184, .12);
}
.tree-link.is-current .tree-count { color: #c7d2fe; background: rgba(129, 140, 248, .22); }

.tree-children {
  display: none;
  margin-left: 12px;
  padding-left: 9px;
  border-left: 1px solid rgba(148, 163, 184, .12);
}
.tree-node.is-open > .tree-children { display: block; }
.tree-empty { padding: 5px 8px 7px; font-size: 12px; color: #5f708e; }

.sidebar-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 12px 8px 2px;
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, .12);
  font-size: 11.5px;
  color: #6b7c99;
  white-space: nowrap;
}
.foot-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .09);
  color: #c3cee0;
  font-size: 12px;
}
.user-avatar {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, .22);
  color: #c7d2fe;
}
.user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 3px 6px;
  border-radius: 7px;
  color: #8fa0bf;
  font-size: 11.5px;
}
.logout-btn:hover { background: rgba(148, 163, 184, .16); color: #fff; }
.local-status { display: flex; align-items: center; gap: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .14); }
.version { font-size: 11px; color: #4f6080; }

/* 收起状态 */
html.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); padding-left: 12px; padding-right: 12px; }
html.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
html.sidebar-collapsed .brand-text,
html.sidebar-collapsed .nav-text,
html.sidebar-collapsed .nav-label,
html.sidebar-collapsed .sidebar-recent,
html.sidebar-collapsed .sidebar-tree,
html.sidebar-collapsed .version { display: none; }
html.sidebar-collapsed .nav-item { justify-content: center; padding: 0; width: 46px; margin: 4px auto; }
html.sidebar-collapsed .nav-item.is-active { box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .32); }
html.sidebar-collapsed .nav-icon { color: #9aa8c0; }
html.sidebar-collapsed .nav-item.is-active .nav-icon { color: #c7d2fe; }
html.sidebar-collapsed .sidebar-foot { align-items: center; padding: 14px 0 4px; }
html.sidebar-collapsed .user-box { flex-direction: column; gap: 6px; padding: 4px 6px; background: transparent; }
html.sidebar-collapsed .foot-meta { display: none; }
html.sidebar-collapsed .local-status { gap: 0; }
/* 移动端侧栏始终是展开宽度，恢复完整布局 */
@media (max-width: 900px) {
  html.sidebar-collapsed .user-box { flex-direction: row; gap: 8px; padding: 6px 7px; background: rgba(148, 163, 184, .09); }
  html.sidebar-collapsed .sidebar-foot { align-items: stretch; padding: 12px 8px 2px; }
  html.sidebar-collapsed .foot-meta { display: flex; }
}

/* ==========================================================
   主区域
   ========================================================== */
.main {
  position: relative;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .26s cubic-bezier(.4, 0, .2, 1);
}
html.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

.main::before {
  content: "";
  position: fixed;
  inset: 0 0 auto var(--sidebar-w);
  height: 340px;
  pointer-events: none;
  background:
    radial-gradient(620px 220px at 8% 0%, rgba(99, 102, 241, .10), transparent 72%),
    radial-gradient(520px 220px at 88% 0%, rgba(14, 165, 233, .085), transparent 72%);
  transition: left .26s;
  z-index: 0;
}
html.sidebar-collapsed .main::before { left: var(--sidebar-w-collapsed); }

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 38px 40px 70px;
}
.page.narrow { max-width: none; }

/* 宽屏下适当加大左右留白，内容始终铺满可视区域 */
@media (min-width: 1600px) {
  .page { padding-left: 56px; padding-right: 56px; }
}
@media (min-width: 2200px) {
  .page { padding-left: 72px; padding-right: 72px; }
}

.mobile-bar { display: none; }

/* 页头 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 9px;
}
.page-title {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.025em;
  font-weight: 700;
  color: #0b1324;
}
.page-sub { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { color: #c4cddb; }
.crumbs .current { color: var(--text-2); font-weight: 600; }

/* 统计卡 */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #dbe2f0; }
.stat-icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--brand);
  background: linear-gradient(140deg, #eef2ff, #e3e9ff);
}
.stat-icon.cyan { color: #0e7490; background: linear-gradient(140deg, #ecfeff, #d9f5fb); }
.stat-icon.amber { color: #b45309; background: linear-gradient(140deg, #fffbeb, #fdf0d0); }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* 面板 */
.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.surface + .surface { margin-top: 20px; }

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfdff, #fafbfe);
}
.surface-title { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.surface-title .count { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.surface-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.surface-meta strong { color: var(--text-2); }

/* 搜索框 */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 390px;
}
.search-field > .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 41px;
  padding: 0 38px 0 39px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.search-field input::placeholder { color: #a6b1c2; }
.search-field input:focus {
  border-color: #b9c3ff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .10);
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted-2);
  background: transparent;
  border: 0;
}
.search-clear:hover { background: #f1f4fa; color: var(--text-2); }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; }
table.data.fixed-layout { table-layout: fixed; }
.data th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .04em;
  color: #8a95a8;
  background: #fafbfe;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data td {
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f8;
  vertical-align: middle;
  font-size: 13.5px;
}
.data tbody tr { transition: background .14s; }
.data tbody tr:hover { background: #fafbff; }
.data tbody tr:last-child td { border-bottom: 0; }

.entity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 39px;
  height: 39px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #4f46e5;
  background: linear-gradient(140deg, #eef2ff, #e0f2fe);
  border: 1px solid #e4e9ff;
}
.entity-name {
  display: inline-block;
  max-width: 100%;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.entity-name:hover { color: var(--brand); }
.entity-meta { margin-top: 2px; font-size: 11.5px; color: var(--muted-2); }
.entity-text { min-width: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #4f46e5;
  background: var(--brand-soft);
  white-space: nowrap;
}
.badge b { font-weight: 700; }
.badge.gray { color: #616e82; background: #f1f4f9; }
.badge.green { color: #0a7d5a; background: var(--success-soft); }

.muted-cell { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* 预览列：只读展示应用下的全部手册名称，超出列宽时截断为 … */
.preview-list {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-2);
}
.preview-list .sep { margin: 0 6px; color: #c3cbd8; }
.preview-empty { font-size: 12.5px; color: var(--muted-2); }

.ip-cell {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-actions { text-align: right; white-space: nowrap; }
.actions { display: inline-flex; align-items: center; gap: 7px; justify-content: flex-end; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 41px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .12s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #5b6dfa, #7c5cf5);
  box-shadow: 0 9px 20px -10px rgba(91, 109, 250, .85);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 24px -10px rgba(91, 109, 250, .95); transform: translateY(-1px); }

.btn-ghost { color: #3c4a60; background: #fff; border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--brand-dark); border-color: #c6d0ff; background: #fafbff; }

.btn-soft { color: #4f46e5; background: var(--brand-soft); border-color: transparent; }
.btn-soft:hover { color: #4338ca; background: var(--brand-soft-2); }

.btn-danger { color: #fff; background: linear-gradient(135deg, #e5484d, #c92a2f); box-shadow: 0 8px 18px -10px rgba(220, 61, 67, .9); }
.btn-danger:hover { color: #fff; filter: brightness(1.04); }

.btn-danger-ghost { color: #d23c42; background: #fff; border-color: #f2d3d5; }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #eebfc2; color: #b91c1c; }

.btn-sm { height: 33px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 5px; }
.btn-sm .ico { width: 14px; height: 14px; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #5b6779;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--brand); border-color: #cdd6ff; background: #fafbff; }

/* 快捷创建手册 */
.quick-create { margin-bottom: 20px; }
.quick-create-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.quick-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand);
  background: linear-gradient(140deg, #eef2ff, #e3e9ff);
}
.quick-field { flex: 1 1 280px; min-width: 0; }
.quick-field.narrow { flex: 0 1 210px; }
.quick-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}
.quick-field .input { height: 42px; }
.quick-create-form .btn { height: 42px; }

/* 空状态 */
.empty { padding: 54px 24px 58px; text-align: center; }
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: #6366f1;
  background: linear-gradient(140deg, #eef2ff, #e0f2fe);
  border: 1px solid #e4eaff;
}
.empty-title { font-size: 15px; font-weight: 650; color: var(--text-2); }
.empty-text { margin: 6px auto 18px; max-width: 420px; color: var(--muted); font-size: 13px; }

/* ==========================================================
   弹窗 / 表单 / 提示
   ========================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .44);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-mask.is-open { display: flex; animation: maskIn .16s ease-out; }

.modal {
  width: 452px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .22s cubic-bezier(.22, 1, .36, 1);
}
.modal.modal-wide { width: 560px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}
.modal-title { margin: 0; font-size: 17.5px; font-weight: 700; letter-spacing: -.01em; }
.modal-sub { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-body { padding: 20px 24px 6px; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 22px;
  margin-top: 6px;
}
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 0; background: #f4f6fa; color: #7b879b; display: grid; place-items: center; }
.modal-close:hover { background: #eaedf5; color: var(--text); }

.field { margin-bottom: 4px; }
.modal-body .field + .field { margin-top: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; }
.field .help { margin-top: 7px; font-size: 11.5px; color: var(--muted-2); }

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfcff;
  font-size: 14px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder { color: #a6b1c2; }
.input:focus { background: #fff; border-color: #b9c3ff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .10); }

.confirm-head { display: flex; align-items: center; gap: 13px; padding: 24px 24px 0; }
.confirm-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #d23c42;
  background: var(--danger-soft);
}
.confirm-icon.info { color: var(--brand); background: var(--brand-soft); }
.confirm-title { font-size: 16.5px; font-weight: 700; margin: 0; }
.confirm-text { margin: 14px 0 0; padding: 0 24px; color: #58657a; font-size: 13.5px; line-height: 1.75; word-break: break-word; }
.confirm-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 22px 24px 22px; }

/* Toast */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  max-width: min(92vw, 380px);
  padding: 11px 15px;
  border-radius: 12px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .55);
  animation: toastIn .22s cubic-bezier(.22, 1, .36, 1);
  pointer-events: auto;
}
.toast .ico { color: #4ade80; }
.toast.error .ico { color: #f87171; }
.toast.warning .ico { color: #fbbf24; }
.toast.leaving { animation: toastOut .18s ease-in forwards; }

/* ==========================================================
   编辑器
   ========================================================== */
.editor-page { padding-top: 26px; }

.editor-topbar {
  position: sticky;
  top: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .90);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 15px;
  box-shadow: 0 12px 36px -22px rgba(15, 23, 42, .38), var(--shadow-xs);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.doc-meta { min-width: 0; flex: 1 1 190px; }
.doc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f3f5fa;
  border-radius: 11px;
  flex: none;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #566277;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tool-btn:hover { background: #fff; color: #374151; box-shadow: 0 1px 3px rgba(15, 23, 42, .10); }
.tool-btn.is-active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.tool-btn .tool-label { display: inline; }

.editor-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  padding-right: 2px;
}
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; transition: background .2s; }
.save-state.is-dirty .dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .14); }
.save-state.is-saved .dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); }
.save-state.is-saving .dot { background: var(--brand); animation: pulseDot 1s infinite; }

/* 文字颜色菜单 */
.color-wrap { position: relative; flex: none; }
.color-current {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #111;
  border: 1px solid rgba(15, 23, 42, .18);
  flex: none;
}
.color-chevron { color: #94a3b8; }
.color-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 216px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 44px -16px rgba(15, 23, 42, .30);
  animation: menuIn .14s ease-out;
}
.color-menu.is-open { display: grid; }
.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  text-align: left;
}
.color-option:hover { background: #f6f8fd; border-color: #eef1f8; }
.swatch {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, .16);
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, .08);
}
.swatch.white { border-color: #cbd5e1; box-shadow: 0 1px 2px rgba(15, 23, 42, .10); }

/* 导出下拉菜单 */
.export-wrap { position: relative; flex: none; }
.export-chevron { color: #94a3b8; transition: transform .16s ease; }
.export-wrap.is-open .export-chevron { transform: rotate(180deg); }
.export-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  display: none;
  width: 232px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 44px -16px rgba(15, 23, 42, .30);
  animation: menuIn .14s ease-out;
}
.export-menu.is-open { display: block; }
.export-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-2);
  text-decoration: none;
  transition: background .14s, color .14s;
}
.export-item:hover { background: #f6f8fd; color: var(--text); }
.export-item .ico { color: var(--brand); }
.export-item span { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; min-width: 0; }
.export-item strong { font-size: 12.5px; font-weight: 650; color: var(--text); }
.export-item small { font-size: 11px; color: var(--muted-2); }
.export-item:hover strong { color: var(--brand-dark); }

/* 编辑画布 */
.doc-canvas {
  position: relative;
  margin-top: 18px;
  padding: 52px 62px 72px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 44px -28px rgba(15, 23, 42, .22), var(--shadow-xs);
  min-height: calc(100vh - 230px);
}
.doc-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 62px;
  right: 62px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7 55%, #06b6d4);
  opacity: .75;
}

#editor {
  min-height: calc(100vh - 400px);
  outline: none;
  font-size: 15px;
  line-height: 1.85;
  color: #263244;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
#editor:empty::before {
  content: attr(data-placeholder);
  color: #b3bdcc;
  pointer-events: none;
}
#editor h1, #editor h2, #editor h3, #editor h4 { color: #0f172a; line-height: 1.4; margin: 1.4em 0 .6em; letter-spacing: -.01em; }
#editor h1 { font-size: 1.75em; }
#editor h2 { font-size: 1.36em; padding-bottom: .35em; border-bottom: 1px solid #eef2f8; }
#editor h3 { font-size: 1.14em; }
#editor p { margin: .7em 0; }
#editor ul, #editor ol { padding-left: 1.5em; }
#editor li { margin: .3em 0; }

#editor a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, .35);
  text-underline-offset: 3px;
}
#editor a:hover { text-decoration-color: #2563eb; }

#editor code {
  font-family: var(--mono);
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 5px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #d5f2ec;
}

#editor pre {
  margin: 1.1em 0;
  padding: 17px 20px;
  color: #e2e8f0;
  background:
    radial-gradient(500px 160px at 0% 0%, rgba(99, 102, 241, .16), transparent 70%),
    #0f172a;
  border: 1px solid #1e2b45;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 12px 28px -20px rgba(15, 23, 42, .55);
}
#editor pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

#editor blockquote {
  margin: 1.1em 0;
  padding: 13px 18px;
  border-left: 3px solid #818cf8;
  border-radius: 0 10px 10px 0;
  color: #475569;
  background: #f7f8ff;
}
#editor blockquote p { margin: .2em 0; }

#editor img {
  max-width: 100%;
  max-height: 460px;
  height: auto;
  margin: 10px 8px 10px 0;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .4);
  cursor: zoom-in;
  vertical-align: middle;
  transition: transform .16s, box-shadow .16s;
}
#editor img:hover { transform: scale(1.012); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .5); }

#editor table { width: 100%; border-collapse: collapse; margin: 1.1em 0; font-size: .94em; }
#editor th, #editor td { border: 1px solid #dfe6f0; padding: 9px 12px; text-align: left; }
#editor th { background: #f6f8fd; font-weight: 650; }

#editor hr { border: 0; height: 1px; background: #e8edf5; margin: 2em 0; }

.editor-hint {
  margin: 16px 4px 0;
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* 图片大图 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(8, 15, 30, .84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; animation: maskIn .18s ease-out; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  background: rgba(255, 255, 255, .10);
  color: #e2e8f0;
  font-size: 12px;
}

/* ==========================================================
   动画
   ========================================================== */
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1180px) {
  .page { padding: 32px 28px 60px; }
  .doc-canvas { padding: 44px 42px 62px; }
  .doc-canvas::before { left: 42px; right: 42px; }
  .tool-btn .tool-label { display: none; }
}

@media (max-width: 900px) {
  .sidebar {
    width: var(--sidebar-w) !important;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 0 60px rgba(2, 6, 23, .4);
  }
  body.sidebar-open .sidebar { transform: none; }
  html.sidebar-collapsed .sidebar { padding-left: 14px; padding-right: 14px; }
  html.sidebar-collapsed .brand { justify-content: flex-start; padding-left: 8px; padding-right: 8px; }
  html.sidebar-collapsed .brand-text { display: flex; }
  html.sidebar-collapsed .nav-text { display: inline; }
  html.sidebar-collapsed .nav-label { display: block; }
  html.sidebar-collapsed .version { display: block; }
  html.sidebar-collapsed .sidebar-recent { display: block; }
  html.sidebar-collapsed .sidebar-tree { display: block; }
  html.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 0 13px; width: auto; margin: 3px 2px; }
  html.sidebar-collapsed .sidebar-foot { align-items: stretch; padding: 12px 8px 2px; }
  html.sidebar-collapsed .local-status { gap: 8px; }
  .sidebar-recent,
  .sidebar-tree { display: block; }
  .sidebar-toggle { display: none; }
  html.sidebar-collapsed .main::before,
  .main::before { left: 0; }
  .main { margin-left: 0 !important; }
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 57px;
    padding: 0 18px;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; color: var(--text); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(15, 23, 42, .40);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .page { padding: 24px 18px 54px; }
  .page-title { font-size: 23px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px 16px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head-actions { width: 100%; }
  .surface-head { flex-direction: column; align-items: stretch; gap: 11px; padding: 14px 16px; }
  .search-field { max-width: none; }
  .surface-meta { text-align: right; }
  .doc-canvas { padding: 32px 24px 48px; border-radius: 14px; }
  .doc-canvas::before { left: 24px; right: 24px; }
  .editor-topbar { top: 8px; gap: 9px; }
  .doc-meta { flex: 1 1 auto; min-width: 0; padding: 0 2px; }
  .editor-actions { order: 2; width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  /* 手机端「导出」下拉菜单改为从按钮左侧展开，避免右对齐时超出屏幕 */
  .export-menu {
    right: auto;
    left: 0;
    width: 232px;
    max-width: calc(100vw - 28px);
  }
  .tool-group { order: 3; width: 100%; justify-content: center; }
  .save-state { margin-right: auto; }
  .editor-page { padding-top: 16px; }
}

@media (max-width: 820px) {
  /* 平板及以下：表格改为卡片式，避免横向挤压 */
  .data thead { display: none; }
  .data, .data tbody, .data tr, .data td { display: block; width: 100%; }
  .data tr { padding: 15px 16px; border-bottom: 1px solid #eef2f8; }
  .data tbody tr:last-child { border-bottom: 0; }
  .data td { padding: 0; border: 0; }
  .data td:nth-child(3):not(.cell-actions) { display: none; }
  .preview-list { white-space: normal; overflow: visible; }
  .data td:nth-child(2) { margin-top: 9px; }
  .data td.cell-actions { margin-top: 12px; text-align: left; }
  .data td.cell-actions .actions { justify-content: flex-start; }
  .actions { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .btn-sm { height: 32px; }

  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 9px; padding: 12px; }
  .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .stat-icon .ico { width: 17px; height: 17px; }
  .stat-value { font-size: 19px; }
  .stat-label { font-size: 11px; }
  .quick-create-form { gap: 10px; }
  .quick-create-form .btn { width: 100%; }

  .editor-topbar { padding: 9px 10px; }
  .tool-btn { padding: 0 9px; }
  .tool-btn .tool-label { display: inline; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .confirm-foot { flex-direction: column-reverse; }
  .confirm-foot .btn { width: 100%; }
  .toast-stack { left: 14px; right: 14px; top: 14px; }
  .toast { max-width: none; }
}

/* ==========================================================
   登录页
   ========================================================== */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(91, 109, 250, .30), transparent 62%),
    radial-gradient(760px 480px at 92% 108%, rgba(14, 165, 233, .22), transparent 62%),
    linear-gradient(180deg, #101a31 0%, #0a1120 100%);
  color: #e8edf7;
}

.login-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .5;
}
.login-orb.orb-a {
  width: 460px; height: 460px;
  top: -160px; right: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(124, 92, 245, .55), transparent 68%);
}
.login-orb.orb-b {
  width: 520px; height: 520px;
  bottom: -240px; left: -160px;
  background: radial-gradient(circle at 60% 40%, rgba(14, 165, 233, .38), transparent 68%);
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 20px;
}

.login-card {
  width: 100%;
  max-width: 404px;
  padding: 34px 34px 26px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 22px;
  box-shadow: 0 40px 90px -34px rgba(2, 6, 23, .85), 0 2px 0 rgba(255, 255, 255, .5) inset;
  color: var(--text);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}
.login-mark {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 12px 24px -12px rgba(91, 109, 250, .85);
}
.login-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.login-brand-text strong { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.login-brand-text small { font-size: 11px; color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; }

.login-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.login-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--danger-soft);
  border: 1px solid rgba(220, 61, 67, .18);
  color: #b3242a;
  font-size: 12.5px;
  line-height: 1.5;
}
.login-alert .ico { margin-top: 1px; color: var(--danger); }

.login-form { display: flex; flex-direction: column; gap: 15px; margin-top: 22px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }

.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-icon {
  position: absolute;
  left: 13px;
  display: grid;
  place-items: center;
  color: #9aa7bd;
  pointer-events: none;
  transition: color .15s;
}
.login-input {
  width: 100%;
  height: 45px;
  padding: 0 44px 0 40px;
  background: #f7f9fd;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-input::placeholder { color: #aab5c6; }
.login-input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(91, 109, 250, .13);
}
.login-input-wrap:focus-within .login-input-icon { color: var(--brand); }

.login-eye {
  position: absolute;
  right: 7px;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #93a0b4;
}
.login-eye:hover { background: #eef1f8; color: var(--text-2); }
.login-eye .eye-hide { display: none; }
.login-eye.is-on .eye-show { display: none; }
.login-eye.is-on .eye-hide { display: block; }

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, #6a5bf7 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: .04em;
  box-shadow: 0 18px 34px -16px rgba(91, 109, 250, .8);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.login-submit:hover { filter: brightness(1.04); box-shadow: 0 20px 40px -16px rgba(91, 109, 250, .9); }
.login-submit:active { transform: translateY(1px); }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
}
.login-copy { margin: 0; font-size: 11.5px; color: rgba(203, 213, 225, .55); }

@media (max-width: 480px) {
  .login-shell { justify-content: flex-start; padding: 34px 16px 28px; }
  .login-card { padding: 26px 22px 22px; border-radius: 18px; }
  .login-title { font-size: 20px; }
}
