/* ===== OSX.INK 现代化主题 ===== */
:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f5f6fb;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .07), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 18px 40px -12px rgba(79, 70, 229, .28), 0 8px 20px -8px rgba(15, 23, 42, .12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, #e8e7ff 0%, rgba(232, 231, 255, 0) 60%),
    var(--bg) !important;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

/* 品牌区 */
.logo { padding: 26px 0 6px; }
#main-logo { filter: drop-shadow(0 6px 18px rgba(79, 70, 229, .18)); transition: transform .3s ease; }
#main-logo:hover { transform: translateY(-2px) scale(1.02); }

/* 输入框统一 */
.form-control {
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 12px !important;
  box-shadow: none !important;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control::placeholder { color: var(--ink-3); }
.form-control:hover { border-color: #cbd5e1; }
.form-control:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12) !important;
  background: #fff;
}

/* 主输入框强化 */
#urlbox {
  height: 60px !important;
  font-size: 17px !important;
  border-width: 2px !important;
  border-color: #dbe0ea !important;
  border-radius: 14px 0 0 14px !important;
  padding-left: 20px;
  background: #fff;
}
#urlbox:focus { border-color: var(--brand) !important; }

/* 按钮 */
.btn-primary, .cz-shorten-btn {
  background: var(--brand-grad) !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 0 14px 14px 0 !important;
  padding: 0 34px !important;
  height: 60px;
  font-size: 16px;
  box-shadow: var(--shadow-lg);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn-primary:hover, .cz-shorten-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 22px 46px -14px rgba(79, 70, 229, .42);
}
.btn-primary:active, .cz-shorten-btn:active { transform: translateY(0) scale(.99); }
.btn-primary:focus, .cz-shorten-btn:focus { outline: none; }

/* 输入组附加元素 */
.input-group-addon {
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-right: 0;
  border-radius: 12px 0 0 12px !important;
  color: var(--ink-2);
  font-size: 14px;
  padding: 0 14px;
  height: 48px;
  line-height: 46px;
  white-space: nowrap;
}
.input-group .form-control { border-radius: 0 12px 12px 0 !important; }

/* 统计卡片 */
.panel {
  border: 1px solid rgba(226, 232, 240, .9) !important;
  border-radius: var(--radius) !important;
  background: rgba(255, 255, 255, .86) !important;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md) !important;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s ease;
  overflow: hidden;
}
.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px -12px rgba(15, 23, 42, .18) !important;
}
.panel-body { padding: 26px 18px !important; }
.panel .newsize { margin: 0; font-size: 15px !important; }
.panel .newsize:first-child {
  font-weight: 600 !important;
  color: var(--ink-2) !important;
  font-size: 13px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}
.panel .newsize:last-child {
  font-size: 40px !important;
  font-weight: 800 !important;
  line-height: 1.15;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 6px !important;
  font-variant-numeric: tabular-nums;
}

/* 标题与正文 */
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; }
.alert-danger {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #be123c !important;
  border-radius: 14px !important;
}
.alert-danger h3 { color: #be123c !important; font-weight: 700; }

/* 底部导航 */
.navbar.navbar-fixed-bottom {
  background: rgba(15, 23, 42, .94) !important;
  backdrop-filter: blur(14px) saturate(160%);
  border: 0 !important;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, .16);
  min-height: 56px;
}
.navbar.navbar-fixed-bottom .navbar-brand,
.navbar.navbar-fixed-bottom .nav > li > a {
  color: #cbd5e1 !important;
  font-size: 14px;
  font-weight: 500;
  padding: 17px 15px;
  transition: color .16s ease, background .16s ease;
  border-radius: 8px;
}
.navbar.navbar-fixed-bottom .navbar-brand:hover,
.navbar.navbar-fixed-bottom .nav > li > a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .07);
}
.navbar.navbar-fixed-bottom .nav > li.active > a {
  color: #fff !important;
  background: var(--brand-grad) !important;
  border-radius: 8px;
  box-shadow: 0 6px 18px -6px rgba(124, 58, 237, .7);
}

/* 下拉菜单 */
.dropdown-menu {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px !important;
  margin-top: 6px !important;
  animation: dropIn .16s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown-menu > li > a {
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background .14s ease, color .14s ease;
}
.dropdown-menu > li > a:hover { background: #f1f5f9; color: var(--ink); }

/* 表格 */
.table { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.table > thead > tr > th {
  border-bottom: 1px solid var(--line) !important;
  background: #f8fafc;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 13px 14px !important;
}
.table > tbody > tr > td { padding: 13px 14px !important; border-color: #f1f5f9 !important; vertical-align: middle; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfdff; }
.table > tbody > tr:hover { background: #f5f7ff !important; }

/* 分页 */
.pager > li > a {
  border-radius: 10px !important;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 500;
  transition: all .16s ease;
}
.pager > li > a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 顶部导航（user/admin 页面） */
.navbar.navbar-default.navbar-fixed-top {
  background: rgba(255, 255, 255, .88) !important;
  backdrop-filter: blur(14px) saturate(180%);
  border: 0 !important;
  border-bottom: 1px solid rgba(226, 232, 240, .9) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  min-height: 58px;
}
.navbar.navbar-default .navbar-brand {
  color: var(--ink) !important;
  font-weight: 800 !important;
  letter-spacing: -.01em;
  height: 58px;
  line-height: 28px;
}
.navbar.navbar-default .nav > li > a {
  color: var(--ink-2) !important;
  font-weight: 500;
  font-size: 14px;
  transition: color .16s ease;
  padding-top: 19px;
  padding-bottom: 19px;
}
.navbar.navbar-default .nav > li > a:hover { color: var(--brand) !important; }

/* 深色模式适配 */
body.dark-mode { background: #0b1020 !important; color: #e2e8f0; }
body.dark-mode .panel { background: rgba(23, 30, 51, .8) !important; border-color: #253050 !important; }
body.dark-mode .form-control { background: #131a2e; border-color: #253050; color: #e2e8f0; }
body.dark-mode .input-group-addon { background: #0f1526; border-color: #253050; color: #94a3b8; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { color: #f1f5f9; }
body.dark-mode .table { background: #131a2e; color: #cbd5e1; }
body.dark-mode .table > thead > tr > th { background: #0f1526; color: #94a3b8; border-color: #253050 !important; }
body.dark-mode .table > tbody > tr > td { border-color: #1e2942 !important; }
body.dark-mode .navbar.navbar-default.navbar-fixed-top { background: rgba(11, 16, 32, .9) !important; border-color: #1e2942 !important; }
body.dark-mode .navbar.navbar-default .navbar-brand { color: #f1f5f9 !important; }
body.dark-mode .dropdown-menu { background: #131a2e; border-color: #253050 !important; }
body.dark-mode .dropdown-menu > li > a { color: #cbd5e1; }
body.dark-mode .dropdown-menu > li > a:hover { background: #1e2942; color: #fff; }

/* 响应式 */
@media (max-width: 767px) {
  #urlbox { height: 52px !important; font-size: 15px !important; }
  .cz-shorten-btn { height: 52px; padding: 0 22px !important; }
  .panel .newsize:last-child { font-size: 32px !important; }
  .navbar.navbar-fixed-bottom .nav > li > a { padding: 15px 10px; font-size: 13px; }
}

/* 底部导航项间距 */
.navbar.navbar-fixed-bottom .nav > li { margin-left: 4px; }
.navbar.navbar-fixed-bottom .navbar-collapse { padding-left: 6px; }

/* 统计页标签页美化 */
.nav-tabs.statics-tabs {
  border: 0 !important;
  margin: 26px auto 22px !important;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 520px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.nav-tabs.statics-tabs > li { float: none !important; display: inline-block !important; margin: 0 !important; }
.nav-tabs.statics-tabs > li > a {
  border: 0 !important;
  border-radius: 10px !important;
  color: var(--ink-2) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px !important;
  margin: 0 !important;
  transition: all .18s ease;
  background: transparent !important;
}
.nav-tabs.statics-tabs > li > a:hover { background: rgba(79,70,229,.08) !important; color: var(--brand) !important; }
.nav-tabs.statics-tabs > li.active > a,
.nav-tabs.statics-tabs > li.active > a:hover {
  background: var(--brand-grad) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px -8px rgba(79,70,229,.6);
}
.nav-tabs.statics-tabs > li.active > a::after { display: none !important; }

/* 统计页表格列宽与换行 */
.table td { word-break: break-all; }
.table td:first-child { white-space: nowrap; word-break: normal; }
.table td a { color: var(--brand); text-decoration: none; }
.table td a:hover { text-decoration: underline; }

/* 表头统一样式微调 */
.table > thead > tr > th { text-align: left; }
.table > thead > tr > th:first-child { padding-left: 18px !important; }

/* 内页正文排版 */
.container .row p,
.container p {
  line-height: 1.85;
  color: var(--ink-2);
  font-size: 15px;
}
.container h2, .container h3 {
  margin-top: 1.4em;
  margin-bottom: .7em;
  letter-spacing: -.01em;
}
.container h2:first-child, .container h3:first-child { margin-top: .4em; }
/* 内容卡片留白 */
.container .col-lg-10, .container .col-md-10 { padding-left: 32px; padding-right: 32px; }
@media (max-width: 767px) {
  .container .col-lg-10, .container .col-md-10 { padding-left: 18px; padding-right: 18px; }
}

/* 修复底部固定导航遮挡内容 */
body { padding-bottom: 90px !important; }
@media (max-width: 767px) {
  body { padding-bottom: 110px !important; }
}

/* 分页栏 */
.pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0 8px;
  padding: 14px 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.per-page { color: var(--ink-2); font-size: 14px; }
.per-page select {
  height: 34px;
  padding: 0 10px;
  margin: 0 2px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.per-page select:hover { border-color: #c7d2fe; }
.per-page select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }

.pagination { margin: 0 !important; display: flex; gap: 4px; flex-wrap: wrap; }
.pagination > li > a,
.pagination > li > span {
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  color: var(--ink-2) !important;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px !important;
  margin: 0 !important;
  background: #fff !important;
  transition: all .16s ease;
}
.pagination > li > a:hover { background: #eef2ff !important; color: var(--brand) !important; border-color: #c7d2fe !important; }
.pagination > li.active > span {
  background: var(--brand-grad) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(79,70,229,.6);
}
.pagination > li.disabled > span { color: var(--ink-3) !important; background: #f8fafc !important; cursor: not-allowed; }
body.dark-mode .pager-bar { background: rgba(23,30,51,.8); border-color: #253050; }
body.dark-mode .per-page select { background: #131a2e; border-color: #253050; color: #e2e8f0; }
body.dark-mode .pagination > li > a, body.dark-mode .pagination > li > span { background: #131a2e !important; border-color: #253050 !important; color: #cbd5e1 !important; }
@media (max-width: 767px) {
  .pager-bar { flex-direction: column; align-items: stretch; }
  .pagination { justify-content: center; }
}

/* 公开/私有开关 */
.visibility-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 1.5px solid var(--line);
  transition: border-color .18s ease, background .18s ease;
  margin: 0;
  font-weight: 500;
}
.visibility-toggle:hover { border-color: #c7d2fe; background: #fff; }
.visibility-toggle input { display: none; }
.vt-track {
  width: 44px; height: 25px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
  transition: background .22s ease;
}
.vt-thumb {
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15,23,42,.24);
  transition: transform .22s cubic-bezier(.3,.7,.3,1);
}
.visibility-toggle input:checked + .vt-track { background: var(--brand-grad); }
.visibility-toggle input:checked + .vt-track .vt-thumb { transform: translateX(19px); }
.vt-text { font-size: 14px; color: var(--ink); line-height: 1.4; }
.vt-text small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; margin-top: 2px; }

/* 公开/私有徽章 */
.badge-public, .badge-private {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-public { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-private { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
body.dark-mode .visibility-toggle { background: rgba(19,26,46,.7); border-color: #253050; }
body.dark-mode .vt-text { color: #e2e8f0; }
body.dark-mode .badge-public { background: rgba(4,120,87,.18); color: #6ee7b7; border-color: rgba(110,231,183,.3); }
body.dark-mode .badge-private { background: rgba(100,116,139,.18); color: #94a3b8; border-color: #253050; }

/* 表格容器防溢出 */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  margin-bottom: 4px;
}
.table-responsive > .table { margin-bottom: 0; min-width: 0; }
.table { table-layout: auto; width: 100% !important; }
.table > tbody > tr > td, .table > thead > tr > th {
  white-space: nowrap;
}
/* 目标网址列允许收缩 */
.table > tbody > tr > td.long-url, .table > thead > tr > th.long-url {
  white-space: normal;
  word-break: break-all;
  max-width: 320px;
  min-width: 140px;
}
/* 页面容器留出边距，避免贴边 */
.services-section .container { padding-left: 18px; padding-right: 18px; }
@media (max-width: 991px) {
  .table > tbody > tr > td, .table > thead > tr > th { padding: 10px 10px !important; font-size: 13px; }
}

/* 修复：白底区块高度固定导致长列表溢出到灰底 */
.services-section,
.contact-section,
.intro-section {
  height: auto !important;
  min-height: 100vh;
  padding-bottom: 60px !important;
}
.services-section > .container,
.contact-section > .container {
  padding-bottom: 20px;
}

/* 批量操作栏 */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.batch-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.batch-all input, .row-check {
  width: 17px; height: 17px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand);
}
.batch-count { font-size: 13px; color: var(--ink-3); }
.batch-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-batch {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .16s ease;
}
.btn-batch:hover { border-color: #c7d2fe; background: #eef2ff; color: var(--brand); }
.btn-batch-danger { color: #dc2626; border-color: #fecaca; }
.btn-batch-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.row-num { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
body.dark-mode .batch-bar { background: rgba(23,30,51,.8); border-color: #253050; }
body.dark-mode .btn-batch { background: #131a2e; border-color: #253050; color: #cbd5e1; }
body.dark-mode .btn-batch:hover { background: #1e2942; border-color: #3b4a72; }
@media (max-width: 767px) {
  .batch-bar { flex-direction: column; align-items: stretch; }
  .batch-actions { margin-left: 0; }
  .btn-batch { flex: 1; text-align: center; }
}

/* 用户组页徽章间距 */
td .badge-public, td .badge-private { margin-left: 6px; }

/* ===== 用户中心按钮重构 ===== */
/* 自定义复选框 */
.batch-all input[type="checkbox"],
.row-check {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.batch-all .cb-box,
.row-check + .cb-box,
td .cb-box {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: all .16s ease;
  vertical-align: -3px;
  flex: 0 0 auto;
}
.batch-all:hover .cb-box { border-color: var(--brand); }
.batch-all input:checked + .cb-box {
  background: var(--brand-grad);
  border-color: transparent;
}
.batch-all input:checked + .cb-box::after {
  content: '';
  position: absolute;
  left: 5px; top: 1.5px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.batch-all input:indeterminate + .cb-box {
  background: var(--brand-grad);
  border-color: transparent;
}
.batch-all input:indeterminate + .cb-box::after {
  content: '';
  position: absolute;
  left: 3px; top: 7px;
  width: 8px; height: 2px;
  background: #fff;
  border-radius: 1px;
}
/* 行内复选框 */
.row-check { appearance: none; }
td input.row-check {
  position: relative;
  opacity: 1;
  width: 18px; height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all .16s ease;
  vertical-align: middle;
  margin: 0;
}
td input.row-check:hover { border-color: var(--brand); }
td input.row-check:checked {
  background: var(--brand-grad);
  border-color: transparent;
}
td input.row-check:checked::after {
  content: '';
  position: absolute;
  left: 4.5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(42deg);
}

/* 批量操作按钮 */
.batch-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1.5px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s cubic-bezier(.2,.7,.3,1);
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.act-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.act-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(15,23,42,.2); }
.act-btn:active { transform: translateY(0); }
.act-private:hover { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.act-public:hover { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.act-danger { color: #dc2626; border-color: #fecaca; background: #fff; }
.act-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; box-shadow: 0 6px 16px -6px rgba(220,38,38,.28); }

/* 已选计数 */
.batch-count {
  font-size: 13px;
  color: var(--ink-3);
  padding: 5px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  transition: all .2s ease;
  white-space: nowrap;
}
.batch-count b { color: var(--brand); font-size: 14px; font-weight: 700; }

/* 行内图标按钮 */
.row-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  transition: all .16s ease;
  text-decoration: none !important;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: #eef2ff; border-color: #c7d2fe; color: var(--brand); transform: translateY(-1px); }
.icon-danger:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
/* 暗色 */
body.dark-mode .act-btn { background: #131a2e; border-color: #253050; color: #cbd5e1; }
body.dark-mode .act-private:hover { background: #1e1b3a; border-color: #4c1d95; color: #c4b5fd; }
body.dark-mode .act-public:hover { background: #062f26; border-color: #065f46; color: #6ee7b7; }
body.dark-mode .act-danger { background: #131a2e; border-color: #4c1d24; color: #fca5a5; }
body.dark-mode .batch-count { background: #1e2942; color: #94a3b8; }
body.dark-mode .icon-btn { background: #131a2e; border-color: #253050; color: #94a3b8; }
body.dark-mode td input.row-check, body.dark-mode .batch-all .cb-box { background: #131a2e; border-color: #3b4a72; }
@media (max-width: 767px) {
  .batch-actions { margin-left: 0; width: 100%; }
  .act-btn { flex: 1; justify-content: center; }
  .row-actions { gap: 4px; }
  .icon-btn { width: 30px; height: 30px; }
}

/* 表格内容居中 */
.table-center { text-align: center; }
.table-center > thead > tr > th,
.table-center > tbody > tr > td { text-align: center !important; }
.table-center .row-actions { justify-content: center; }
/* 说明列左对齐更易读 */
.table-center > tbody > tr > td.lt { text-align: left !important; }

/* 保存按钮 */
.act-save { border-color: #c7d2fe; color: var(--brand); background: #eef2ff; }
.act-save:hover { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -8px rgba(79,70,229,.55); }
body.dark-mode .act-save { background: rgba(79,70,229,.18); border-color: #3730a3; color: #a5b4fc; }
body.dark-mode .act-save:hover { background: var(--brand-grad); color: #fff; }

/* 表头强制居中（覆盖 th 默认左对齐） */
.table-center > thead > tr > th { text-align: center !important; }
.table-center > thead > tr > th.lt { text-align: left !important; }
/* 默认分组实心五角星 */
.star-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  color: #f59e0b;
  margin-left: 2px;
}
.star-default svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 3px rgba(245,158,11,.4)); }
body.dark-mode .star-default { color: #fbbf24; }

/* 操作列固定槽位对齐 */
.row-actions { display: flex; gap: 6px; align-items: center; }
.action-slot {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
/* 默认星标复用 icon-btn 尺寸，仅改配色 */
.icon-btn.star-default {
  color: #f59e0b;
  border-color: #fde68a;
  background: #fffbeb;
  cursor: default;
}
.icon-btn.star-default:hover {
  background: #fffbeb;
  border-color: #fde68a;
  color: #f59e0b;
  transform: none;
}
body.dark-mode .icon-btn.star-default {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.35);
  color: #fbbf24;
}

/* 表单操作按钮组 */
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.act-btn.act-primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79,70,229,.55);
}
.act-btn.act-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 26px -10px rgba(79,70,229,.65);
  color: #fff;
}
.act-btn.act-cancel {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
  text-decoration: none !important;
}
.act-btn.act-cancel:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ink);
  text-decoration: none !important;
}
body.dark-mode .act-btn.act-cancel { background: #131a2e; border-color: #253050; color: #94a3b8; }
body.dark-mode .act-btn.act-cancel:hover { background: #1e2942; color: #e2e8f0; }
/* 按钮内文字垂直居中（a 标签场景） */
.act-btn { text-decoration: none !important; line-height: 1.2; }

/* 表单按钮统一尺寸，仅用配色区分主次 */
.form-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 18px; flex-wrap: wrap; }
.form-actions .act-btn {
  min-width: 112px;
  height: 38px;
  padding: 0 18px;
  justify-content: center;
  border-width: 1.5px;
  border-style: solid;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 11px;
  box-sizing: border-box;
}
.form-actions .act-btn svg { width: 15px; height: 15px; }
.form-actions .act-btn.act-primary { border-color: transparent; }
.form-actions .act-btn.act-cancel { border-color: var(--line); }

/* 表单按钮最终统一：等宽、同边框、同字重 */
.form-actions .act-btn {
  min-width: 118px;
  height: 38px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  transition: all .18s cubic-bezier(.2,.7,.3,1);
}
.form-actions .act-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.form-actions .act-btn.act-cancel {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.form-actions .act-btn.act-cancel:hover {
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(15,23,42,.18);
}
body.dark-mode .form-actions .act-btn.act-cancel {
  background: #1a2237; border-color: #2f3b57; color: #cbd5e1;
}
body.dark-mode .form-actions .act-btn.act-cancel:hover {
  background: #222c45; border-color: #3b4a72; color: #f1f5f9;
}

/* 主次按钮阴影强度拉近，避免视觉尺寸差异 */
.form-actions .act-btn.act-primary { box-shadow: 0 3px 10px -3px rgba(79,70,229,.42); }
.form-actions .act-btn.act-primary:hover { box-shadow: 0 8px 20px -6px rgba(79,70,229,.55); }

/* 美化下拉框 */
.select-wrap { position: relative; display: inline-block; width: 100%; min-width: 140px; }
.nice-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s ease;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.nice-select:hover { border-color: #c7d2fe; background: #fbfcff; }
.nice-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
  background: #fff;
}
.select-wrap .select-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--ink-3);
  pointer-events: none;
  transition: color .16s ease;
}
.nice-select:hover + .select-caret,
.nice-select:focus + .select-caret { color: var(--brand); }
body.dark-mode .nice-select { background: #131a2e; border-color: #253050; color: #e2e8f0; }
body.dark-mode .nice-select:hover { background: #1a2237; border-color: #3b4a72; }
body.dark-mode .select-wrap .select-caret { color: #64748b; }
/* 分配表内操作按钮紧凑 */
td .act-btn.act-save { height: 34px; min-width: 88px; padding: 0 14px; }

/* 分配表下拉框收窄 */
.select-wrap { display: inline-block; width: auto; min-width: 0; }
.nice-select {
  width: auto;
  min-width: 118px;
  max-width: 160px;
}

/* ===== 内容页（关于/许可/API） ===== */
.page-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.page-hero { text-align: center; padding: 20px 0 34px; }
.page-hero-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(79,70,229,.55);
}
.page-hero-icon svg { width: 32px; height: 32px; }
.page-hero h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -.02em;
}
.page-hero-sub { color: var(--ink-3); font-size: 15px; margin: 0; }

.page-card {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 8px 0;
}
.page-card-block { padding: 26px 32px; text-align: left; }
.page-card-block + .page-card-block { border-top: 1px solid #f1f5f9; }
.page-card-block h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
}
.page-card-block h3::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 2px;
  background: var(--brand-grad);
}
.page-card-block p { color: var(--ink-2); font-size: 15px; line-height: 1.85; margin: 0 0 12px; }
.page-card-block p:last-child { margin-bottom: 0; }
.inline-link { color: var(--brand); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(79,70,229,.3); }
.inline-link:hover { border-bottom-color: var(--brand); }

.page-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding: 4px 32px 26px;
}
.feature-item {
  padding: 20px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-align: left;
  transition: all .22s cubic-bezier(.2,.7,.3,1);
}
.feature-item:hover {
  background: #fff;
  border-color: #c7d2fe;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(79,70,229,.28);
}
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: #eef2ff;
  color: var(--brand);
  margin-bottom: 12px;
}
.feature-icon svg { width: 19px; height: 19px; }
.feature-item h4 { font-size: 14.5px; font-weight: 700; margin: 0 0 6px; }
.feature-item p { font-size: 13px; color: var(--ink-3); line-height: 1.65; margin: 0; }

/* 规则列表 */
.rule-list { list-style: none; padding: 0; margin: 0; }
.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.rule-list li + li { border-top: 1px dashed #f1f5f9; }
.rule-mark {
  flex: 0 0 auto;
  width: 21px; height: 21px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.rule-mark svg { width: 12px; height: 12px; }
.rule-forbid .rule-mark { background: #fee2e2; color: #dc2626; }
.rule-note .rule-mark { background: #d1fae5; color: #059669; }

/* API 卡片 */
.api-intro {
  text-align: center;
  color: var(--ink-2);
  font-size: 14.5px;
  margin-bottom: 20px;
}
.api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.api-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: all .22s cubic-bezier(.2,.7,.3,1);
}
.api-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.api-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.api-card-head h3 { font-size: 15.5px; font-weight: 700; margin: 0; }
.api-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand);
  letter-spacing: .04em;
}
.api-row { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; font-size: 13.5px; }
.api-row:last-child { margin-bottom: 0; }
.api-label { flex: 0 0 34px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.api-code {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #334155;
  word-break: break-all;
}
.api-desc { flex: 1; color: var(--ink-2); line-height: 1.6; }
.api-desc b { color: var(--ink); font-weight: 700; }
.api-pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 12.8px;
  overflow-x: auto;
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.api-note { font-size: 13px !important; color: var(--ink-3) !important; }

/* 暗色 */
body.dark-mode .page-card, body.dark-mode .api-card { background: rgba(23,30,51,.82); border-color: #253050; }
body.dark-mode .page-card-block + .page-card-block { border-color: #1e2942; }
body.dark-mode .page-card-block p, body.dark-mode .rule-list li, body.dark-mode .api-desc { color: #94a3b8; }
body.dark-mode .feature-item { background: #131a2e; border-color: #253050; }
body.dark-mode .feature-item:hover { background: #1a2237; border-color: #3b4a72; }
body.dark-mode .feature-icon { background: rgba(79,70,229,.16); color: #a5b4fc; }
body.dark-mode .api-code { background: #131a2e; border-color: #253050; color: #cbd5e1; }
body.dark-mode .rule-list li + li { border-color: #1e2942; }
body.dark-mode .page-hero-sub, body.dark-mode .api-intro { color: #64748b; }

@media (max-width: 767px) {
  .page-wrap { padding: 24px 16px 90px; }
  .page-card-block { padding: 20px 18px; }
  .page-card-grid { padding: 4px 18px 20px; }
  .page-hero h1 { font-size: 24px; }
  .api-grid { grid-template-columns: 1fr; }
  .api-card { padding: 16px 16px; }
}

/* 内容页底部留白，避免被固定导航遮挡 */
.page-wrap { padding-bottom: 130px !important; }
@media (max-width: 767px) { .page-wrap { padding-bottom: 150px !important; } }

/* 移动端代码块与 API 行防溢出 */
.api-pre { white-space: pre-wrap; word-break: break-all; }
@media (max-width: 767px) {
  .api-row { flex-wrap: wrap; }
  .api-label { flex: 0 0 auto; }
  .api-code, .api-desc { flex: 1 1 100%; }
  .api-card { padding: 16px 14px; }
  .page-wrap { padding-bottom: 170px !important; }
}

/* 未登录时的锁定开关 */
.visibility-toggle.vt-locked {
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: .92;
}
.visibility-toggle.vt-locked:hover { border-color: #e2e8f0; background: #f8fafc; }
.visibility-toggle.vt-locked .vt-track { background: #e2e8f0; }
.visibility-toggle.vt-locked .vt-text { color: var(--ink-3); }
.visibility-toggle.vt-locked .vt-text small { color: #94a3b8; }
.vt-login { color: var(--brand); font-weight: 600; }
.vt-login:hover { color: #4338ca; }
body.dark-mode .visibility-toggle.vt-locked { background: #131a2e; border-color: #253050; }
body.dark-mode .visibility-toggle.vt-locked .vt-text small { color: #64748b; }

/* ===== 快捷缩短弹窗 ===== */
.bm-modal .modal-dialog { max-width: 520px; margin: 60px auto; }
.bm-modal .modal-content {
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 30px 70px -20px rgba(15,23,42,.42) !important;
  overflow: hidden;
  background: #fff;
}
.bm-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .16s ease;
  z-index: 2;
}
.bm-close:hover { background: #f1f5f9; color: #475569; }
.bm-close svg { width: 17px; height: 17px; }

.bm-head {
  padding: 32px 32px 22px;
  text-align: center;
  background: linear-gradient(180deg, #f8f7ff 0%, #ffffff 100%);
}
.bm-icon {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--brand-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px -10px rgba(79,70,229,.55);
}
.bm-icon svg { width: 27px; height: 27px; }
.bm-head h4 { font-size: 19px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.bm-head p { font-size: 13.5px; color: var(--ink-3); margin: 0; line-height: 1.6; }

.bm-body { padding: 6px 32px 0; }
.bm-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.bm-step {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 13.8px;
  color: var(--ink-2);
  line-height: 1.6;
}
.bm-num {
  flex: 0 0 auto;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.bm-step kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11.5px;
  font-family: inherit;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-bottom-width: 2px;
  border-radius: 5px;
  color: #475569;
}

.bm-drag-area {
  padding: 24px;
  border: 2px dashed #ddd6fe;
  border-radius: 16px;
  background: #fafaff;
  text-align: center;
  margin-bottom: 8px;
}
.bm-bookmarklet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 10px 24px -10px rgba(79,70,229,.6);
  cursor: grab;
  transition: all .18s cubic-bezier(.2,.7,.3,1);
  user-select: none;
}
.bm-bookmarklet:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(79,70,229,.7); }
.bm-bookmarklet:active { cursor: grabbing; transform: scale(.98); }
.bm-bookmarklet svg { width: 17px; height: 17px; }
.bm-hint { display: block; margin-top: 12px; font-size: 12px; color: var(--ink-3); }

.bm-foot {
  padding: 18px 32px 26px;
  display: flex;
  justify-content: center;
}
.bm-foot .act-btn { min-width: 120px; height: 38px; justify-content: center; }

/* 暗色 */
body.dark-mode .bm-modal .modal-content { background: #131a2e; }
body.dark-mode .bm-head { background: linear-gradient(180deg, #1a1f3a 0%, #131a2e 100%); }
body.dark-mode .bm-head p, body.dark-mode .bm-hint { color: #64748b; }
body.dark-mode .bm-step { color: #94a3b8; }
body.dark-mode .bm-num { background: rgba(79,70,229,.2); color: #a5b4fc; }
body.dark-mode .bm-step kbd { background: #1e2942; border-color: #2f3b57; color: #cbd5e1; }
body.dark-mode .bm-drag-area { background: rgba(79,70,229,.06); border-color: #3b3f6e; }
body.dark-mode .bm-close:hover { background: #1e2942; color: #cbd5e1; }

@media (max-width: 767px) {
  .bm-modal .modal-dialog { margin: 20px 14px; }
  .bm-head { padding: 26px 20px 18px; }
  .bm-body { padding: 6px 20px 0; }
  .bm-drag-area { padding: 18px 14px; }
  .bm-foot { padding: 16px 20px 22px; }
  .bm-head h4 { font-size: 17px; }
}
