/* 后台与安装页 */
.admin-wrap {
  min-height: 100vh;
  padding: calc(var(--header-h) + 32px) 16px 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.admin-card {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}

.admin-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.admin-lead {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.admin-error {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.admin-form label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
}

.admin-form textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.admin-submit {
  width: 100%;
  margin-top: 20px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-muted);
  font-weight: 600;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.article-prose {
  max-width: 720px;
  margin: 0 auto;
}

.article-prose h2,
.article-prose h3 {
  margin: 1.25em 0 0.5em;
}

.article-prose p,
.article-prose li {
  margin: 0.65em 0;
}

.article-prose img {
  max-width: 100%;
  height: auto;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}

.article-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.article-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--accent);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* WordPress 风格：文章双栏、小工具、归档与版权声明 */
.wp-shell {
  max-width: 1160px;
}

.wp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.wp-primary {
  min-width: 0;
}

.wp-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.wp-widget {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.wp-widget__title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.wp-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-widget__list li {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.wp-widget__list a {
  color: var(--text);
  text-decoration: none;
}

.wp-widget__list a:hover {
  color: var(--accent);
}

.wp-widget__list a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.wp-widget__cnt {
  color: var(--text-muted);
  font-size: 0.85em;
}

.wp-widget__list--compact li {
  margin-bottom: 12px;
}

.wp-widget__date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.wp-widget__empty {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.wp-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wp-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
}

.wp-tag:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}

.wp-tag.is-active {
  background: var(--accent-dim);
  color: #0e7490;
  border-color: var(--border-strong);
}

.article-tags-line {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-prev-next__item--next {
  text-align: right;
}

.article-prev-next__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.article-prev-next a {
  font-weight: 600;
  color: var(--text);
}

.article-prev-next a:hover {
  color: var(--accent);
}

/* 文章详情页底部：作者自填版权声明（license_note） */
.entry-license.article-license-note {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.entry-license.article-license-note p {
  margin: 0 0 10px;
}

.entry-license.article-license-note p:last-child {
  margin-bottom: 0;
}

.entry-license.article-license-note strong {
  color: var(--text);
}

@media (max-width: 960px) {
  .wp-grid {
    grid-template-columns: 1fr;
  }

  .wp-aside {
    position: static;
  }

  .article-prev-next {
    grid-template-columns: 1fr;
  }

  .article-prev-next__item--next {
    text-align: left;
  }
}
