/* ── Layout ── */

/* 大屏自适应：覆盖 Bootstrap 3 固定宽度 .container */
@media (min-width: 1200px) {
  .container {
    width: 90%;
    max-width: 1920px;
  }
}
@media (min-width: 1920px) {
  .container {
    width: 85%;
    max-width: 2400px;
  }
}

#wrap { padding-bottom: 160px; }

.main-container {
  padding-top: 20px;
  padding-bottom: 0;
  overflow: visible;
  position: relative;
}

.blog-container.container { margin-top: 0; }

@media (min-width: 992px) {
  .main-container .side-bar,
  .users-show .side-bar,
  .blog-side-col {
    float: right !important;
    position: static !important;
    width: 300px !important;
  }
  .main-container .topics-index.main-col,
  .main-container .feed-list.main-col,
  .main-container .topics-show.main-col,
  .main-container .users-show .left-col,
  .blog-main-col,
  .users-show .left-col {
    float: left !important;
    width: calc(100% - 320px) !important;
  }
  .users-show .col-md-3 {
    float: right !important;
    width: 300px !important;
  }
  .col-md-9.main-col { width: calc(100% - 320px) !important; }
  .sidebar-collapsed .topics-index.main-col,
  .sidebar-collapsed .feed-list.main-col,
  .sidebar-collapsed .topics-show.main-col,
  .sidebar-collapsed .blog-main-col,
  .sidebar-collapsed .users-show .left-col,
  .sidebar-collapsed .col-md-9.main-col {
    width: 100% !important;
  }
  .main-container { padding-bottom: 0; }
}

@media (max-width: 991px) {
  .side-bar, .blog-side-col { display: none; }
  .main-col, .blog-main-col { width: 100% !important; }
  .sidebar-toggle-btn { display: none !important; }
}

@media (max-width: 767px) {
  :root { --nav-height: var(--nav-height-mobile); }
  .topnav.navbar.navbar-default { position: relative; }
  .main-container { padding-top: 14px; padding-bottom: 32px; }
  .reply_count_area { display: none !important; }
  .topic-list .list-group-item { padding: 10px 16px; }
  .side-bar { padding-left: 12px; }
}

.main-col { position: relative; }
.is-sticky #sticker { position: sticky !important; top: 70px !important; }

/* ── Navigation ── */
.topnav.navbar.navbar-default {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  min-height: var(--nav-height);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
}

.topnav .navbar-brand {
  padding: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.topnav .navbar-brand img {
  height: 26px !important;
  width: auto !important;
  margin: 0 !important;
}

.topnav .navbar-nav > li > a {
  color: var(--body) !important;
  font-size: 14.5px;
  font-weight: 500;
  padding: 0 12px !important;
  line-height: var(--nav-height);
  position: relative;
  transition: color var(--ease);
  display: flex;
  align-items: center;
  height: var(--nav-height);
}

.topnav .navbar-nav > li > a:hover,
.topnav .navbar-nav > li.open > a {
  background: transparent !important;
  color: var(--accent) !important;
}

.topnav .navbar-nav > li > a i { margin-right: 5px; opacity: 0.8; transition: opacity var(--ease); }
.topnav .navbar-nav > li > a:hover i { opacity: 1; }

.topnav .dropdown-menu {
  border-radius: 8px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 6px;
  margin-top: 4px;
  min-width: 150px;
  background: var(--bg-surface);
  z-index: 9999;
}

.topnav .dropdown-menu > li > a {
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--body) !important;
  transition: background var(--ease);
}

.topnav .dropdown-menu > li > a:hover {
  background: var(--bg-surface-alt);
  color: var(--accent) !important;
}

.topnav .dropdown-menu > li > a i { width: 14px; text-align: center; opacity: 0.6; }
.topnav .dropdown-menu > li > a:hover i { opacity: 1; }

.topnav .navbar-form {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  margin: 0 8px;
}

.topnav .navbar-form .form-control.search-input {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  color: var(--ink);
  border-radius: 18px;
  padding: 6px 14px;
  height: 34px;
  font-size: 13px;
  width: 160px;
  transition: all var(--ease);
  box-shadow: none;
}

.topnav .navbar-form .form-control.search-input::placeholder { color: var(--faint); }

.topnav .navbar-form .form-control.search-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  width: 200px;
  outline: none;
}

.topnav .github-login > .btn { margin: 0 8px 0 0 !important; vertical-align: middle; }

.topnav .btn.login-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 18px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a !important;
  transition: all var(--ease);
  box-shadow: 0 2px 8px rgba(242,200,17,0.25);
}

.topnav .btn.login-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 4px 12px rgba(242,200,17,0.35);
  transform: translateY(-1px);
}

.topnav .btn.btn-default {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--body) !important;
  border-radius: 18px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--ease);
}

.topnav .btn.btn-default:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--bg-surface-alt);
}

.topnav .navbar-toggle {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  margin-bottom: 8px;
  transition: all var(--ease);
}

.topnav .navbar-toggle:hover { background: var(--bg-surface-alt); border-color: var(--primary); }
.topnav .navbar-toggle .icon-bar { background: var(--ink-light); border-radius: 2px; height: 2px; }

.avatar-topnav {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  margin: 0 6px 0 0 !important;
  display: inline-block;
  vertical-align: middle;
  transition: border-color var(--ease);
}

.avatar-topnav:hover { border-color: var(--primary); }

.topnav .github-login { display: flex !important; align-items: center; height: var(--nav-height); }
.topnav .github-login > li { display: flex !important; align-items: center; float: none !important; height: var(--nav-height); }
.topnav .github-login > li > a { display: flex !important; align-items: center; }

.nav-notification-link {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 8px;
}

/* ── Sidebar Recommend ── */
.sidebar-recommend .panel-body { padding-top: 5px; }
.sidebar-recommend a { padding: 3px; line-height: 40px; }
.sidebar-recommend img { width: 150px; margin: 3px 0; }

/* ── Sidebar Feedback ── */
.sidebar-feedback { color: var(--muted); margin-bottom: 0; }
.sidebar-feedback a { color: var(--muted); }
.sidebar-feedback span { margin-top: 7px; display: inline-block; }
.sidebar-feedback .fa-heart { color: var(--error); opacity: 0.85; }

.badge-important {
  background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%) !important;
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 7px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(245,101,101,0.3);
  color: #fff;
}

.badge-fade { display: none !important; }

/* ── Site Intro ── */
.site-intro {
  background: linear-gradient(135deg, rgba(255,248,225,0.9) 0%, rgba(240,248,255,0.9) 50%, rgba(245,240,255,0.9) 100%);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 8px 24px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--body);
  transition: all var(--ease);
}

.site-intro:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.site-intro.site-intro-flat { box-shadow: 0 1px 0 0 var(--border), 0 0 0 1px var(--border); }

/* ── Sub Category Nav ── */
.subcategory-panel { margin-bottom: 10px; }
.subcategory-panel .panel-body { padding: 8px 15px; }
.subcategory-panel .list-inline { margin: 0; }
.subcategory-panel .list-inline > li > a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--ease);
}
.subcategory-panel .list-inline > li > a.text-muted:hover {
  background: var(--bg-surface-alt);
  color: var(--accent);
}
.subcategory-nav-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: #1a1a1a !important;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 5px;
}

/* ── Panel ── */
.box {
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.panel {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
  margin-bottom: 20px;
  transition: box-shadow var(--ease);
}

.panel:hover { box-shadow: var(--shadow-md); }

.panel-heading {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}

.panel-body { padding: 14px 18px; }

.panel-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 10px 18px;
  font-size: 13px;
}

.panel-footer a { color: var(--muted); transition: color var(--ease); }
.panel-footer a:hover { color: var(--accent); }

.home-topic-list {
  border: none;
  box-shadow: var(--shadow-lg);
  background: var(--bg-surface);
  border-radius: 14px;
}

.home-topic-list .panel-heading {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 18px;
  border-radius: 14px 14px 0 0;
}

.home-topic-list .panel-title { font-size: 15px; }
.home-topic-list .panel-footer { border-radius: 0 0 14px 14px; }

/* ── List Group ── */
.list-group { margin-bottom: 0; }

.list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  background: transparent;
  transition: background var(--ease);
}

.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: var(--bg-surface-alt); }
.list-group-item img.avatar { width: 36px; height: 36px; border-radius: var(--radius-md); object-fit: cover; }
.list-group-item .avatar-small { width: 28px; height: 28px; }
.list-group-item .title { color: var(--ink-light); font-weight: var(--font-medium); transition: color var(--ease); }
.list-group-item .title:hover { color: var(--accent); }
.list-group-item .meta { font-size: var(--text-xs); color: var(--muted); }

/* ── Topic List ── */
.topic-list a, .topic-list a:focus, .topic-list a:hover { color: var(--ink-light); }
.topic-list a:hover { color: var(--accent); }

.topic-list .list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  padding: 8px 18px;
  margin: 0;
  transition: background var(--ease);
  height: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.topic-list .list-group-item:last-child { border-bottom: none; }
.topic-list .list-group-item:hover { background-color: var(--bg-surface-alt); }

.topic-list .list-group-item .avatar {
  position: relative;
  margin: 0;
  flex-shrink: 0;
  float: none;
}

.topic-list .list-group-item .avatar .img-thumbnail {
  border: 2px solid var(--border-light);
  border-radius: 6px;
  transition: all var(--ease);
  padding: 0;
  background: var(--bg-surface);
  width: 36px !important;
  height: 36px !important;
}

.topic-list .list-group-item .avatar .img-thumbnail:hover { border-color: var(--primary); }

.topic-list .list-group-item .infos {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.topic-list .infos .media-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  margin: 0;
  padding-top: 0;
  font-size: 14px;
  line-height: 1.4;
}

.topic-list .infos .media-heading a {
  color: var(--ink-light);
  font-weight: 600;
  transition: color var(--ease);
  display: inline;
}

.topic-list .infos .media-heading a:hover { color: var(--accent); }

.reply_count_area {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  float: none;
  order: 3;
  width: auto;
  margin-left: auto;
  margin-top: 0;
  font-size: 12px;
  color: var(--muted);
  transition: color var(--ease);
  white-space: nowrap;
  text-align: right;
}

.reply_count_area:hover { color: var(--accent); }
.count_of_votes { color: var(--warning); font-weight: 600; }
.count_of_replies { color: var(--accent); font-weight: 600; }
.replies-index .list-group-item.media { padding-top: 15px !important; padding-bottom: 15px !important; }
.count_seperator { color: var(--faint); }
.timeago { color: var(--faint); font-size: 13px; cursor: default; display: inline; white-space: nowrap; }

/* ── Topic Filter ── */
.topic-filter { display: flex; gap: 2px; margin-bottom: 10px; flex-wrap: wrap; }
.topic-filter li { list-style: none; margin: 0; }
.topic-filter li a {
  display: inline-block;
  padding: 7px 14px;
  color: var(--muted);
  border-radius: 6px;
  transition: all var(--ease);
  font-size: 13px;
  font-weight: 500;
}
.topic-filter li a:hover { background: var(--bg-surface-alt); color: var(--accent); }
.topic-filter li.active a {
  border-bottom: 2px solid var(--error);
}

/* ── Nav Tabs (activity page etc.) ── */
.panel-heading .nav-tabs {
  border-bottom: none;
  display: flex;
  gap: 2px;
  margin: 0;
  flex-wrap: wrap;
}
.panel-heading .nav-tabs > li { float: none; margin: 0; }
.panel-heading .nav-tabs > li > a {
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  transition: all var(--ease);
}
.panel-heading .nav-tabs > li > a:hover {
  background: var(--bg-surface-alt);
  color: var(--accent);
  border: none;
}
.panel-heading .nav-tabs > li.active > a,
.panel-heading .nav-tabs > li.active > a:hover,
.panel-heading .nav-tabs > li.active > a:focus {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #1a1a1a;
  border: none;
  font-weight: 500;
}

/* ── Labels ── */
.label {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.2px;
  margin-right: 5px;
  display: inline-block;
}
.label-success { background: var(--success-bg); color: var(--success-ink); }
.label-warning { background: var(--warning-bg); color: var(--warning-ink); }
.label-excellent { margin-left: 0; flex-shrink: 0; }
.label-blog { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-solved { color: var(--success); }
.label-primary { background: var(--info-bg); color: var(--info-ink); }
.label-default { background: var(--bg-surface-alt); color: var(--muted); border: 1px solid var(--border-light); }

/* ── Buttons ── */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all var(--ease);
  font-size: 13px;
  font-family: var(--font-display);
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
}

.btn-primary,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open > .btn-primary.dropdown-toggle {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(242,200,17,0.25);
}
.btn-primary:hover,
.btn-primary:active:hover,
.btn-primary:active:focus,
.btn-primary.active:hover,
.btn-primary.active:focus {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border: none;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(242,200,17,0.35);
  transform: translateY(-1px);
}

/* 覆盖 list-group-item.active 绿色 #00b5ad */
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  color: #1a1a1a;
}

/* ── Vditor fullscreen fix ── */
.vditor--fullscreen { z-index: 1050 !important; }

/* ── Category Dropdown ── */
.category-dropdown { position: relative; }
.category-dropdown-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.category-dropdown-toggle .fa { margin-right: 6px; opacity: 0.7; }
.category-dropdown-arrow { font-size: 11px; opacity: 0.5; transition: transform var(--ease); }
.category-dropdown.open .category-dropdown-arrow { transform: rotate(180deg); }
.category-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-md); margin-top: 4px; padding: 4px 0;
  z-index: 100; max-height: 260px; overflow-y: auto; list-style: none;
}
.category-dropdown.open .category-dropdown-menu { display: block; }
.category-dropdown-menu li {
  padding: 8px 14px; cursor: pointer; font-size: 13px;
  color: var(--body); transition: background var(--ease);
}
.category-dropdown-menu li:hover { background: var(--bg-surface-alt); }
.category-dropdown-menu li.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #1a1a1a; font-weight: 600;
}
.category-dropdown-menu li .fa { margin-right: 6px; opacity: 0.7; }

#up-vote.active {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%) !important;
  border-color: var(--success-dark) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(76,175,80,0.35);
}

.btn-default { border-color: var(--border); color: var(--body); background: var(--bg-surface); }
.btn-default:hover { background: var(--bg-surface-alt); border-color: var(--accent); color: var(--accent); }
.btn-warning { background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%); border: none; color: #1a1a1a; }
.btn-success { background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%); border: none; color: #fff; }
.btn-danger { background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%); border: none; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

@media (max-width: 768px) {
  .btn { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
}

/* ── Forms ── */
.form-control {
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  transition: border var(--ease), box-shadow var(--ease);
  background: var(--bg-surface);
  font-size: 14px;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}
.form-control::placeholder { color: var(--faint); }

/* ── Toggle Switch ── */
.toggle-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; margin: 0; }
.toggle-switch input { display: none; }
.toggle-slider {
  position: relative; width: 44px; height: 24px; background: var(--border); border-radius: 12px; transition: background var(--ease); flex-shrink: 0;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }

/* ── Alerts ── */
.alert {
  border-radius: 10px;
  border: none;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-warning { background: var(--warning-bg); color: var(--warning-ink); border-left: 4px solid var(--warning); }
.alert-success { background: var(--success-bg); color: var(--success-ink); border-left: 4px solid var(--success); }
.alert-danger { background: var(--error-bg); color: var(--error-ink); border-left: 4px solid var(--error); }
.alert-info { background: var(--info-bg); color: var(--info-ink); border-left: 4px solid var(--info); }

/* ── Pagination ── */
.pagination { margin: 4px 0; }
.pagination > li > a,
.pagination > li > span {
  border-radius: 6px;
  transition: all var(--ease);
  color: var(--body);
  border: 1px solid var(--border);
  margin: 0 3px;
  height: var(--pager-btn-h);
  line-height: var(--pager-btn-h);
  padding: 0 12px;
  display: inline-block;
  box-sizing: border-box;
}
.pagination > li > a:hover { background: var(--bg-surface-alt); border-color: var(--primary); color: var(--primary); }
.pagination > .active > a,
.pagination > .active > span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border-color: transparent !important;
  color: #1a1a1a !important;
  box-shadow: 0 2px 6px rgba(242,200,17,0.25);
}

.pager-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pager-footer nav { display: flex; }
.pager-footer .pagination { margin: 0; }
.pager-footer form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.pager-footer select.form-control {
  height: var(--pager-btn-h);
  padding: 0 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: auto;
}

/* ── Sidebar Toggle ── */
.sidebar-toggle-btn {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040;
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  box-shadow: var(--shadow-md);
  transition: all var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.sidebar-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: scale(1.1);
}

/* ── Code Block ── */
.code-block-wrapper {
  position: relative;
  margin: 1em 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #282c34;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #21252b;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.code-block-lang { font-size: var(--text-xs); color: #636d83; font-family: Consolas, monospace; text-transform: uppercase; }
.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid #4b5263;
  color: #9da5b4;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--ease);
}
.code-copy-btn:hover { background: #4b5263; color: #fff; }
.code-copy-btn.copied { color: #98c379; border-color: #98c379; }
.code-block-wrapper pre {
  padding: 0 !important;
  margin: 0 !important;
  background: #282c34 !important;
  border: none !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
  line-height: 1.6 !important;
  overflow-x: auto !important;
  max-width: 100% !important;
}
.code-block-wrapper pre code {
  display: block !important;
  padding: 1em 1.2em !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  white-space: pre !important;
}
.code-block-wrapper pre code::before,
.code-block-wrapper pre code::after { content: none !important; }
.code-block-wrapper .hl-kw { color: #c678dd !important; }
.code-block-wrapper .hl-fn { color: #61afef !important; }
.code-block-wrapper .hl-str { color: #98c379 !important; }
.code-block-wrapper .hl-num { color: #d19a66 !important; }
.code-block-wrapper .hl-cmt { color: #5c6370 !important; font-style: italic; }
.code-block-wrapper .hl-op { color: #56b6c2 !important; }
.code-block-wrapper .hl-var { color: #e06c75 !important; }

/* ── User Follow Info ── */
.follow-info { display: flex; text-align: center; }
.follow-info .col-4 { flex: 1; min-width: 0; }
.follow-info .counter { display: block; font-size: 18px; font-weight: 700; color: var(--ink); }
.follow-info .text { font-size: 12px; color: var(--muted); }

/* ── User Lists ── */
.user-lists { max-height: 110px; overflow: hidden; transition: max-height 0.3s ease; }
.user-lists.expanded { max-height: none; }
.user-lists-toggle {
  display: none;
  margin-top: 14px;
  padding: 5px 14px 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-light);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.user-lists-toggle:hover {
  background: rgba(0,120,212,0.06);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,120,212,0.1);
}

/* ── User Profile Tabs ── */
.user-info-nav { overflow: hidden; }
.user-info-nav::after { content: ""; display: table; clear: both; }
.user-info-nav > li { float: left; margin-right: 0; vertical-align: top; }
.user-info-nav > li > a { display: inline-block; white-space: nowrap; }
.users-show .user-info-nav { border-bottom: none; }

/* ── User Edit Form ── */
.users-show .panel-body .form-group { margin-bottom: 12px; }
.users-show .panel-body label { margin-bottom: 2px; font-weight: 600; font-size: 13px; }
.users-show .panel-body .help-block { margin: 4px 0 0; font-size: 12px; }
.users-show .payment-qrcode { width: 100px; height: auto; object-fit: contain; margin-top: 8px; }

/* ── Avatar Preview ── */
.avatar-preview-img { max-width: 150px; max-height: 150px; }

/* ── File Upload Button ── */
.blog-file-upload { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: normal; cursor: pointer; transition: border-color .2s, color .2s; }
.blog-file-upload:hover { border-color: var(--accent); color: var(--accent); }
.blog-file-upload input[type=file] { display: none; }
.blog-cover-preview { margin-bottom: 10px; }
.blog-cover-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-light); }

/* ── Empty Block ── */
.empty-block { text-align: center; padding: 50px 20px; color: var(--faint); font-size: 14px; }

/* ── Activity Feed ── */
.list-group-item.media { display: flex; align-items: flex-start; }
.list-group-item.media > .avatar { float: none; flex-shrink: 0; margin-right: 14px; }
.list-group-item.media > .avatar img { border: 2px solid var(--border-light); border-radius: 6px; padding: 0 !important; }
.list-group-item.media > .infos { margin-left: 0 !important; margin-top: 0 !important; flex: 1; min-width: 0; }
.feed-list .list-group-item.media { padding: 8px 18px; margin: 0; font-size: 14px; line-height: 1.5; }
.feed-list .list-group-item .media-heading { margin: 0; font-size: 14px; font-weight: 600; }
.feed-list .list-group-item .avatar img { width: 40px !important; height: 40px !important; }
.feed-list .list-group-item.media .infos { margin-top: 0; }

/* ── Upvoted Topics ── */
.blog-pages .article-index .list-group .list-group-item .avatar {
  margin-top: 0; width: 28px !important; height: 28px !important;
  border-radius: 4px; border: 2px solid var(--border-light); padding: 0;
}

/* ── Top Banner ── */
.topbanner { margin-bottom: 4px; }
.topbanner .thumbnail {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow var(--ease);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  padding: 0;
}
.topbanner .grid-item .thumbnail { border: none; padding: 0; }
.topbanner .thumbnail:hover { box-shadow: var(--shadow-md); }
.topbanner .thumbnail img { width: 100%; height: 130px; object-fit: cover; display: block; }
.topbanner .thumbnail .caption { padding: 8px 12px 10px; }
.topbanner .thumbnail .caption h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 5px; }
.topbanner .thumbnail .caption .banner-desc { font-size: 13px; color: var(--muted); margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.topbanner .grid-item { margin-bottom: 8px; }

/* ── Home Sections ── */
.home-section { margin-bottom: 20px; }
.home-section .panel-heading { text-align: center; }
.home-section .panel-title { justify-content: center; display: flex; align-items: center; gap: 6px; }

.home-row { display: flex; gap: 20px; margin-bottom: 20px; }
.home-row .home-section { flex: 1; min-width: 0; margin-bottom: 0; }
@media (max-width: 767px) { .home-row { flex-direction: column; } }

.hot-topic-list .list-group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.hot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-surface-alt);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.hot-topic-list .list-group-item:nth-child(-n+3) .hot-rank {
  background: var(--primary);
  color: #1a1a1a;
}
.hot-topic-list .title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 991px) { .home-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .home-blog-grid { grid-template-columns: 1fr; } }

.home-blog-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: box-shadow var(--ease), transform var(--ease);
  text-decoration: none;
  color: inherit;
}
.home-blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.home-blog-cover {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.home-blog-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-blog-meta { font-size: 12px; color: var(--muted); }

/* ── Footer ── */
.footer { background: var(--bg-surface); box-shadow: 0 -2px 8px rgba(0,0,0,0.06); margin-top: 8px; padding: 15px 0; }
.footer h4 { margin-top: 0; margin-bottom: 8px; }
.footer .footer-social a { padding-right: 8px; }
.footer .footer-social { margin-top: 8px; }
.footer .footer-sponsor { margin-top: 20px; }
.footer .footer-info li { margin-bottom: 4px; }
.footer .footer-info li:last-child { margin-bottom: 0; }
.footer .footer-info { margin-bottom: 0; }
.footer .footer-text { margin-bottom: 8px; }

/* ── Blog Cards ── */
.blog-list-body { padding: 16px; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex;
  flex-direction: row;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-surface);
  transition: box-shadow .25s, transform .25s;
}
.blog-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.blog-card-cover { display: flex; align-items: flex-start; justify-content: center; flex-shrink: 0; padding: 16px 0 0 16px; }
.blog-card-cover img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.blog-card-body { flex: 1; padding: 12px 14px 12px 10px; display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.blog-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.blog-card-title { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.blog-card-title:hover { color: var(--accent); }
.blog-card-author { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.blog-card-desc { font-size: 12px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); line-height: 1.5; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.blog-card-stats { font-size: 12px; color: var(--muted); }
.blog-grid-empty { grid-column: span 2; }

.blog-card2 { display: flex; gap: 10px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); padding: 12px; transition: box-shadow .2s; align-items: center; }
.blog-card2:hover { box-shadow: var(--shadow-md); }
.blog-card2-cover { flex-shrink: 0; width: 60px; height: 60px; border-radius: 6px; overflow: hidden; display: block; background: var(--bg-surface-alt); align-self: center; }
.blog-card2-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card2-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-self: stretch; }
.blog-card2-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blog-card2-title:hover { color: var(--accent); }
.blog-card2-author { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.blog-card2-avatar { width: 16px; height: 16px; border-radius: 50%; }
.blog-card2-desc { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.blog-card2-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.blog-card2-action { display: flex; align-items: center; align-self: center; flex-shrink: 0; }
.blog-new-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px; border: 2px dashed var(--border); border-radius: 8px; color: var(--faint); font-size: 13px; text-decoration: none; background: transparent; transition: color .2s, border-color .2s; }
.blog-new-btn:hover { border-color: var(--muted); color: var(--body); text-decoration: none; }

.blog-sub-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  line-height: 1.4;
  font-size: 12px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
}
.blog-sub-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.blog-sub-btn.subscribed { background: transparent; color: var(--muted); border-color: var(--border); }
.blog-sub-btn.subscribed:hover { color: var(--error); border-color: var(--error); }
.blog-sub-btn.ajax-loading { opacity: .6; pointer-events: none; }

.blog-edit-btn {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  border-radius: 16px;
  background: var(--info);
  color: #fff;
  border: 1px solid var(--info);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.blog-edit-btn:hover { background: var(--info-dark); border-color: var(--info-dark); color: #fff; text-decoration: none; }

.blog-empty-guide { text-align: center; padding: 40px 20px; color: var(--muted); }
.blog-empty-guide .blog-empty-icon { font-size: 48px; color: var(--border); margin-bottom: 16px; }
.blog-empty-guide h4 { margin: 0 0 8px; color: var(--ink); font-weight: 500; }
.blog-empty-guide p { margin: 0 0 20px; font-size: 14px; }
.blog-create-btn-wrap { text-align: center; padding: 16px 0 8px; border-top: 1px solid var(--border); margin-top: 16px; }

/* ── Blog Pages Article List ── */
.blog-pages h1.all-articles {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  margin-top: 0;
  padding-left: 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-pages .list-group { margin-bottom: 0; }
.blog-pages .panel-body { padding: 12px 16px; }

.blog-pages .article-index .list-group .list-group-item {
  line-height: 1.4;
  font-size: 14px;
  padding: 6px 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-pages .article-index .list-group .list-group-item:last-child { border-bottom: none; }
.blog-pages .article-index .list-group .list-group-item:hover { background: var(--bg-surface-alt); }
.blog-pages .article-index .list-group .list-group-item .avatar-wrap { margin-right: 0; flex-shrink: 0; }
.blog-pages .article-index .list-group .list-group-item .avatar { margin-top: 0; width: 28px !important; height: 28px !important; border-radius: 4px; }
.blog-pages .article-index .list-group .list-group-item a.title {
  flex: 1;
  min-width: 0;
  color: var(--ink-light);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-pages .article-index .list-group .list-group-item a.title:hover { color: var(--accent); }
.blog-pages .article-index .list-group .list-group-item span.meta { color: var(--muted); font-size: 11px; white-space: nowrap; flex-shrink: 0; }

/* ── Upvoted Topics (activities page) ── */
.activity .blog-pages .article-index .list-group .list-group-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 18px;
  gap: 12px;
}
.activity .blog-pages .article-index .list-group .list-group-item .avatar-wrap { flex-shrink: 0; }
.activity .blog-pages .article-index .list-group .list-group-item .avatar-small {
  width: 36px !important;
  height: 36px !important;
  border: 2px solid var(--border-light);
  border-radius: 6px;
}
.activity .blog-pages .article-index .list-group .list-group-item a.title {
  font-size: 14px;
  white-space: normal;
  overflow: visible;
}
.activity .blog-pages .article-index .list-group .list-group-item span.meta {
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.blog-pages .list-group-item .meta a { color: var(--faint); }
.blog-pages .list-group-item .meta a:hover { color: var(--accent); }

/* ── Blog Selector ── */
.blog-selector-wrap { margin-bottom: 20px; }
.blog-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.blog-selector-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  margin: 0;
  background: var(--bg-surface);
}
.blog-selector-item:hover { border-color: var(--accent); }
.blog-selector-item.active { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.05); }
.blog-selector-item input[type=radio] { display: none; }
.blog-selector-info { display: flex; align-items: center; gap: 10px; }
.blog-selector-cover { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.blog-selector-text { display: flex; flex-direction: column; }
.blog-selector-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.blog-selector-count { font-size: 12px; color: var(--muted); }

/* 侧边栏草稿 */
.sidebar-draft-link { display:flex; align-items:center; gap:8px; padding:8px 12px; margin-bottom:10px; background:var(--bg-surface); border:1px solid var(--border-light); border-radius:8px; color:var(--muted); font-size:13px; text-decoration:none; transition:border-color .15s,color .15s; }
.sidebar-draft-link:hover { border-color:var(--accent); color:var(--accent); text-decoration:none; }
.sidebar-draft-link i { font-size:14px; }
.sidebar-draft-link span:nth-child(2) { flex:1; }
.sidebar-draft-badge { background:var(--accent); color:#fff; font-size:11px; padding:1px 7px; border-radius:10px; font-weight:600; }

/* 右上角通知徽章 — 与草稿徽章统一圆形药丸 */
.badge-important { font-size:11px; padding:4px 7px; border-radius:50px; font-weight:600; min-width:8px; text-align:center; line-height:1; }

/* ── Inline Style Extractions ── */
.avatar-48 { width: 48px !important; height: 48px !important; }
.avatar-55 { width: 55px !important; height: 55px !important; }
.avatar-38 { width: 38px !important; height: 38px !important; }
.avatar-80 { width: 80px; height: 80px; margin: 5px; }
.avatar-65 { width: 65px; height: 65px; }
.mt-0 { margin-top: 0 !important; }
.icon-color-warning { color: var(--warning) !important; }
.icon-color-primary { color: var(--primary) !important; }
.icon-color-accent { color: var(--accent) !important; }
.icon-color-rss { color: #E5974E !important; font-size: 14px; }
.nav-item-flex { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pager-footer-flex { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pager-form-inline { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.select-auto { width: auto; }
.link-muted { color: var(--muted); font-size: var(--text-sm); }
.reply-highlight { background-color: #fffce9; }
.home-article-avatar { width: 24px; height: 24px; border-radius: 4px; padding: 0; }
.best-answer-heading { background-color: var(--success) !important; color: #fff !important; }
.pr-20 { padding-right: 20px !important; }
.text-unread { color: var(--warning) !important; }

/* ── Messages ── */
.messages .list-group-item.media { padding: 14px 18px; }
.messages .list-group-item.unread { border-left: 3px solid var(--accent); }
.messages .list-group-item .avatar img.avatar-48 { width: 42px !important; height: 42px !important; }
.messages .message-meta { margin-top: 6px; font-size: var(--text-sm); }
.messages .message-meta p { margin: 0; }
.messages .message-meta a { color: var(--muted); transition: color var(--ease); }
.messages .message-meta a:hover { color: var(--accent); }
.messages .media-body { margin-top: 4px; font-size: var(--text-sm); color: var(--body); }
.messages .panel-heading h1 { font-size: var(--text-lg); margin: 0; font-weight: var(--font-semibold); }
.icon-color-eye-active { color: var(--error); opacity: 0.7; }
.markdown-body-topic { font-size: 16px; }

/* 大屏下 markdown 渲染内容靠左，编辑器宽度不变 */
@media (min-width: 1400px) {
  .markdown-body,
  .markdown-reply {
    max-width: 900px;
  }
  .article-body .markdown-body {
    max-width: none;
  }
}
.author-signature-link { display: block; width: 30px; color: var(--faint); margin: 22px 0 8px; }

/* ── Auth Floating Box ── */
.floating-box .panel {
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border: 1px solid var(--border-light);
}
.floating-box .panel-body { padding: 24px; }
.floating-box .panel-heading { border-radius: 16px 16px 0 0; padding: 18px 24px; }
.floating-box .form-control { padding: 10px 14px; border-radius: 8px; }

/* ── WeChat Button ── */
.btn-wechat {
  background: #07c160;
  color: #fff !important;
  border: none;
  margin-top: 10px;
  border-radius: 6px;
  transition: background .2s;
}
.btn-wechat:hover, .btn-wechat:focus { background: #06ad56; color: #fff !important; }

/* ── File Attachment Card ── */
.file-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: border-color var(--ease), box-shadow var(--ease);
  max-width: 100%;
}
.file-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.file-card-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; flex-shrink: 0;
}
.file-card-info { min-width: 0; flex: 1; }
.file-card-name { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.file-card-dl { flex-shrink: 0; color: var(--muted); font-size: 14px; padding: 4px 6px; transition: color var(--ease); text-decoration: none !important; border-radius: var(--radius-sm); }
.file-card-dl:hover { color: var(--accent); background: rgba(0,0,0,.05); }
.file-card-dl-guest { color: var(--muted); }
.file-card-dl-guest:hover { color: var(--primary); }
.file-icon-pbix { background: #f2c811; }
.file-icon-xlsx, .file-icon-xls, .file-icon-csv { background: #217346; }
.file-icon-pdf { background: #e44d3c; }
.file-icon-doc, .file-icon-docx { background: #2b579a; }
.file-icon-ppt, .file-icon-pptx { background: #d24726; }
.file-icon-zip, .file-icon-rar { background: #f0ad4e; }
.file-icon-default { background: var(--muted); }

/* ── Draft Cards ── */
.draft-card {
  padding: 16px 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  margin-bottom: 12px;
}
.draft-card:hover { border-color: var(--accent-light); }
.draft-card-header { display: flex; justify-content: space-between; align-items: center; }
.draft-card-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.draft-card-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.draft-card-preview { margin-top: 8px; font-size: 13px; color: var(--ink-light); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.draft-card-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ── Docs ── */
.doc-version { font-size: 12px; color: var(--muted); margin-left: 6px; }
.doc-tree { list-style: none; padding: 0; margin: 0; }
.doc-tree ul { list-style: none; padding: 0; margin: 0; }
.doc-tree li a { display: block; padding: 8px 14px; color: var(--ink-light); font-size: 13px; border-bottom: 1px solid var(--border-light); text-decoration: none; }
.doc-tree li a:hover { background: var(--bg-surface-alt); color: var(--accent); }
.doc-tree li.active > a { color: var(--accent); font-weight: 600; background: var(--bg-surface-alt); border-left: 3px solid var(--accent); }
.doc-tree ul a { padding-left: 28px; }
.doc-tree ul ul a { padding-left: 42px; }
.doc-tree li:last-child > a { border-bottom: none; }
.doc-body { line-height: 1.8; }
.doc-page-meta { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--muted); display: flex; gap: 16px; }
.doc-card { padding: 16px 20px; border: 1px solid var(--border-light); border-radius: var(--radius-lg); margin-bottom: 12px; }
.doc-card:hover { border-color: var(--accent-light); }
.doc-card h4 { margin: 0; font-size: 16px; }
.doc-card h4 a { color: var(--ink); }
.doc-card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.doc-card-desc { font-size: 13px; color: var(--ink-light); margin: 8px 0 0; }
.doc-welcome { text-align: center; padding: 40px 20px; }
.doc-collaborators-section { margin-top: 20px; padding: 16px; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); }
.doc-collaborators-section h5 { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.doc-collaborators-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.doc-collaborators-list .label { display: inline-block; position: static; z-index: auto; padding: 5px 10px; font-size: 13px; line-height: 1.4; }
.doc-add-collaborator { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.doc-add-collaborator .form-control { width: 180px; height: 30px; }

/* ── SweetAlert2 弹窗自定义 ── */
div:where(.swal2-container) div:where(.swal2-popup) {
  width: 420px;
  padding: 1.5em 1.5em 1.25em;
  border-radius: 12px;
}
div:where(.swal2-container) div:where(.swal2-html-container) {
  font-size: 15px;
  line-height: 1.6;
}
div:where(.swal2-container) button:where(.swal2-styled) {
  padding: 8px 24px;
  font-size: 14px;
  border-radius: 6px;
}
