/* NavHub 后台样式（复用主站赛博设计系统） */

/* ---------- 登录屏 ---------- */
.login-screen {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 10;
  padding: 20px;
}
.login-card {
  width: min(360px, 100%);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  animation: modalIn .4s cubic-bezier(.34,1.4,.64,1);
  box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 40px rgba(255,45,149,.2);
}
.login-logo { font-size: 44px; filter: drop-shadow(0 0 14px rgba(0,240,255,.6)); animation: logoFloat 3.2s ease-in-out infinite; }
.login-card h1 {
  margin: 10px 0 4px;
  font-size: 22px; font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-sub { font-size: 13px; color: var(--text-2); margin-bottom: 22px; }
.login-card input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  text-align: center;
  letter-spacing: 2px;
  transition: all .25s;
}
.login-card input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(0,240,255,.12), 0 0 18px rgba(0,240,255,.25); }
.btn-block { width: 100%; margin-top: 14px; padding: 12px; font-size: 14px; }
.login-tip { font-size: 11.5px; color: var(--text-3); margin-top: 16px; }
.login-back { display: inline-block; font-size: 12.5px; color: var(--accent-text); margin-top: 10px; }
.login-back:hover { text-shadow: 0 0 10px rgba(255,45,149,.6); }

/* ---------- 管理布局 ---------- */
.admin-side {
  position: fixed;
  left: 14px; top: 14px; bottom: 14px;
  width: 200px;
  border-radius: 24px;
  padding: 18px 12px;
  display: flex; flex-direction: column;
  z-index: 5;
}
.admin-brand {
  font-size: 17px; font-weight: 900;
  padding: 4px 10px 16px;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-brand small { font-size: 11px; font-weight: 600; color: var(--text-3); -webkit-text-fill-color: var(--text-3); }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.anav {
  display: flex; align-items: center;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  text-align: left;
  border: 1px solid transparent;
  transition: all .2s;
}
.anav:hover { background: var(--glass-hover); color: var(--text-1); transform: translateX(3px); }
.anav.active {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 0 16px rgba(255,45,149,.5);
}
.admin-side-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--glass-border); }

.admin-main {
  margin-left: 228px;
  padding: 26px clamp(14px, 3vw, 34px) 60px;
  max-width: 1200px;
}

/* ---------- 视图 ---------- */
.aview { display: none; animation: fadeIn .3s; }
.aview.active { display: block; }
.atitle {
  font-size: 20px; font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 0 14px rgba(255,45,149,.35);
}
.asub { font-size: 15px; font-weight: 700; margin: 24px 0 12px; }

/* ---------- 统计卡片 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.stat-card {
  border-radius: 16px;
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all .25s;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--neon-cyan); box-shadow: 0 0 20px rgba(0,240,255,.2); }
.stat-num {
  font-size: 26px; font-weight: 900;
  font-family: var(--mono);
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: 1px; }

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
}
.tinput, .tselect {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  font-size: 13.5px;
  outline: none;
  transition: all .2s;
}
.tinput { flex: 1; min-width: 160px; }
.tinput:focus, .tselect:focus { border-color: var(--neon-cyan); box-shadow: 0 0 14px rgba(0,240,255,.15); }

/* 网站弹窗：富文本编辑器 */
.rich-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: rgba(20, 8, 40, .45);
}
.rt-swatch, .rt-hl {
  width: 24px; height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.25);
  background: var(--c);
  cursor: pointer;
  box-shadow: 0 0 8px var(--c);
  transition: transform .15s;
}
.rt-swatch:hover, .rt-hl:hover { transform: scale(1.18); }
.rt-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1px;
  margin-right: 2px;
}
.rich-toolbar input[type="color"] {
  width: 34px; height: 26px; padding: 2px;
  border-radius: 7px; border: 1px solid var(--glass-border);
  background: var(--input-bg); cursor: pointer;
}
.rt-sep {
  width: 1px; height: 20px;
  background: var(--glass-border);
  margin: 0 2px;
}
.rich-editor {
  min-height: 130px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 0 0 10px 10px;
  background: var(--input-bg);
  color: var(--text-1);
  /* 与前台详情字号完全一致：所见即所得，几行就是几行 */
  font-size: 14.5px;
  line-height: 1.9;
  outline: none;
  word-break: break-word;
}
.rich-editor:focus { border-color: var(--neon-cyan); box-shadow: 0 0 14px rgba(0,240,255,.15); }
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  pointer-events: none;
}
.rich-editor a {
  color: var(--neon-cyan);
  text-decoration: underline;
  text-decoration-style: dashed;
}
/* 荧光笔预览效果 */
.rich-editor span[style*="background-color"] {
  border-radius: 6px;
  padding: 2px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 底部链接编辑行 */
.sf-links {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 8px;
}
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.link-row input:focus { border-color: var(--neon-cyan); }
/* 关键修复：覆盖 .field input[type=text] 的 width:100%（会把 URL 框挤成 30px 细条） */
.link-row input[type="text"] { width: auto; }
.link-row .lr-name { flex: 0 0 32%; min-width: 0; }
.link-row .lr-type {
  flex: 0 0 auto;
  width: 86px;
  padding: 8px 6px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.link-row .lr-type:focus { border-color: var(--neon-cyan); }
.link-row .lr-url { flex: 1 1 auto; min-width: 0; }
.link-row .lr-del {
  padding: 8px 12px;
  color: var(--danger);
  flex-shrink: 0;
}
.link-row .lr-del:hover { border-color: var(--danger); }
.tselect option { background: #14082a; }

/* ---------- 表格 ---------- */
.atable-wrap {
  border-radius: 16px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.atable th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.atable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-2);
  vertical-align: middle;
}
.atable tbody tr { transition: background .15s; }
.atable tbody tr:hover { background: var(--glass-hover); }
.atable tbody tr:last-child td { border-bottom: none; }
.atable .site-cell { display: flex; align-items: center; gap: 10px; color: var(--text-1); font-weight: 600; }
.atable .site-cell img { width: 18px; height: 18px; border-radius: 4px; }
.atable .site-cell .sinit {
  width: 18px; height: 18px; border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  background: var(--accent-grad);
}
.atable a { color: var(--neon-cyan); }
.atable .cat-badge {
  padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600;
  background: var(--glass-hover); color: var(--accent-text);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.atable .clicks { font-family: var(--mono); color: var(--neon-yellow); }
.row-act {
  display: flex; gap: 6px;
}
.row-act .btn { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.atable input[type="checkbox"] { accent-color: var(--neon-pink); width: 15px; height: 15px; cursor: pointer; }
.td-input {
  background: transparent; border: 1px solid transparent;
  color: var(--text-1); font-size: 13.5px;
  padding: 5px 8px; border-radius: 8px; outline: none;
  width: 100%;
  transition: all .2s;
}
.td-input:hover { border-color: var(--glass-border); }
.td-input:focus { border-color: var(--neon-cyan); background: var(--input-bg); }

/* ---------- 设置面板 ---------- */
.panel {
  border-radius: 16px;
  padding: 20px;
  max-width: 640px;
  margin-bottom: 6px;
}
.egrid { display: grid; grid-template-columns: 1fr 2fr auto auto; gap: 8px; }
.egrid input {
  padding: 9px 12px; border-radius: 10px;
  background: var(--input-bg); border: 1px solid var(--glass-border);
  color: var(--text-1); font-size: 13px; outline: none;
}
.egrid input:focus { border-color: var(--neon-cyan); }
.egrid input[type="color"] { width: 44px; height: 38px; padding: 3px; cursor: pointer; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .admin-side {
    position: sticky;
    width: auto; margin: 12px;
    top: 0; left: 0; right: 0; bottom: auto;
    flex-direction: row; align-items: center;
    padding: 10px 12px;
    gap: 8px;
  }
  .admin-brand { padding: 0 6px 0 0; white-space: nowrap; }
  .admin-nav { flex-direction: row; overflow-x: auto; flex: 1; }
  .anav { padding: 8px 12px; white-space: nowrap; }
  .admin-side-foot { flex-direction: row; border-top: none; padding-top: 0; padding-left: 8px; }
  .admin-main { margin-left: 0; padding-top: 10px; }
  .egrid { grid-template-columns: 1fr 1fr; }
}
