/* QzoneArchive Web - 全局样式
   简洁现代风格，支持响应式 */

:root {
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --primary-light: #64b5f6;
    --success: #43a047;
    --warn: #fb8c00;
    --danger: #e53935;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #263238;
    --text-muted: #78909c;
    --border: #e0e6ed;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ============================================
   顶部导航
   ============================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}
.logo-icon { font-size: 24px; }

.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}
.main-nav a {
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
}
.main-nav a:hover { background: var(--bg); }
.main-nav a.active { color: var(--primary); background: #e3f2fd; }
.main-nav .admin-link { color: var(--warn); }

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-form {
    display: flex;
    background: var(--bg);
    border-radius: 20px;
    padding: 3px 3px 3px 14px;
    border: 1px solid var(--border);
}
.search-form input {
    border: none;
    background: transparent;
    outline: none;
    width: 180px;
    font-size: 13px;
    padding: 4px 0;
}
.search-form button {
    border: none;
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.user-menu .welcome { color: var(--text-muted); }
.btn-link { color: var(--primary); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }

/* Flash */
.flash-msg {
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
}
.flash-msg.success { background: #e8f5e9; color: #2e7d32; }
.flash-msg.error { background: #ffebee; color: #c62828; }
.flash-msg.flash-info { background: #e3f2fd; color: #1565c0; }

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-block;
    padding: 7px 18px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn-ok { background: var(--success); }
.btn-ok:hover { background: #2e7d32; }
.btn-warn { background: var(--warn); }
.btn-warn:hover { background: #ef6c00; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c62828; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ============================================
   布局
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.layout {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

.layout .main-content.full {
    grid-column: 1 / -1;
}

/* 响应式 */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .user-menu .welcome { display: none; }
    .search-form input { width: 120px; }
    .site-header .container { flex-wrap: wrap; height: auto; padding: 8px; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar .card { margin-bottom: 16px; }

/* ============================================
   卡片
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h2 { margin: 0; font-size: 20px; }

.section-title {
    margin: 0 0 16px 0;
    font-size: 18px;
}

/* ============================================
   个人资料卡
   ============================================ */
.profile-card {
    text-align: center;
    padding: 24px 16px;
}
.profile-card .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 600;
}
.profile-card .nickname {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.profile-card .qq { color: var(--text-muted); font-size: 13px; }

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 统计卡 */
.stats-card .stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.stats-card .stat-item:last-child { border-bottom: none; }
.stats-card .num { font-weight: 600; font-size: 18px; color: var(--primary); }
.stats-card .label { color: var(--text-muted); font-size: 13px; }

/* ============================================
   说说列表
   ============================================ */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.post-card.post-detail { margin-bottom: 20px; }

.post-header {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.post-time { font-weight: 500; color: var(--text); }
.post-source, .post-loc { color: var(--text-muted); }

.post-content {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
    word-break: break-word;
    white-space: pre-wrap;
}

.post-images { margin-bottom: 10px; }

.photo-grid {
    display: grid;
    gap: 4px;
}
.photo-grid.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 480px; }
.photo-grid.cols-4 { grid-template-columns: repeat(4, 1fr); max-width: 480px; }
.photo-grid.single { grid-template-columns: 1fr; max-width: 360px; }
.photo-grid .photo-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    transition: opacity .15s;
}
.photo-grid.single .photo-item img { height: auto; max-height: 400px; }
.photo-grid .photo-item img:hover { opacity: .9; }

.post-footer {
    display: flex;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    align-items: center;
}
.view-detail { margin-left: auto; }

/* 点赞数/评论数：点击弹出说说详情，加可点反馈 */
.detail-link {
    cursor: pointer;
    user-select: none;
    transition: color .15s;
}
.detail-link:hover { color: #1668dc; }

/* ============================================
   留言板
   ============================================ */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.message-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.message-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}
.message-header .meta .author { font-weight: 600; }
.message-header .meta .time { color: var(--text-muted); font-size: 12px; }
.message-content { padding-left: 44px; word-break: break-word; }

.message-replies {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    padding-left: 44px;
}
.reply-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
}
.reply-item .avatar-sm { width: 24px; height: 24px; font-size: 11px; }

/* ============================================
   评论列表
   ============================================ */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { margin-bottom: 4px; font-size: 13px; }
.comment-meta .qq-tag { color: var(--text-muted); font-weight: normal; }
.comment-time { color: var(--text-muted); margin-left: 8px; font-size: 12px; }
.reply-hint { color: var(--primary); margin-left: 8px; font-size: 12px; }
.comment-content { word-break: break-word; }
.comment-stats { margin-top: 4px; color: var(--text-muted); font-size: 12px; }

.like-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.like-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    background: var(--bg);
    padding: 4px 10px 4px 4px;
    border-radius: 16px;
}

/* ============================================
   相册
   ============================================ */
.album-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.album-tabs a {
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}
.album-tabs a.active, .album-tabs a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.album-tabs .count {
    display: inline-block;
    background: rgba(255,255,255,.25);
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 4px;
}
.album-tabs a:not(.active) .count { background: var(--bg); color: var(--text-muted); }

.photo-masonry {
    column-count: 4;
    column-gap: 8px;
}
@media (max-width: 1000px) { .photo-masonry { column-count: 3; } }
@media (max-width: 600px) { .photo-masonry { column-count: 2; } }
.masonry-item {
    break-inside: avoid;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
}
.photo-caption {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   视频
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.video-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.video-cover {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}
.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-cover .no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #555;
}
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    border: 3px solid rgba(255,255,255,.8);
}
.video-info { padding: 10px 14px; }
.video-title {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}
.video-desc {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   标签/徽章
   ============================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: var(--primary);
    color: #fff;
}
.badge-warn { background: var(--warn); }
.badge-ok { background: var(--success); }
.badge-danger { background: var(--danger); }
.badge-msg { background: #9c27b0; }
.qq-tag { color: var(--text-muted); font-size: 12px; }

/* ============================================
   表单
   ============================================ */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 13px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,136,229,.15);
}
.form-group input[disabled] { background: var(--bg); color: var(--text-muted); }
.form-group small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }

.form-vertical .form-group label { font-size: 14px; }

.file-input { padding: 10px; border: 2px dashed var(--border); border-radius: 6px; cursor: pointer; }

/* 认证页 */
.auth-page {
    min-height: calc(100vh - 56px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}
.auth-card h1 { margin: 0 0 24px; text-align: center; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-hint { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 13px; }

/* 欢迎页 */
.welcome-page {
    min-height: calc(100vh - 56px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    text-align: center;
}
.welcome-hero h1 { font-size: 36px; margin-bottom: 12px; }
.welcome-hero .subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; }
.welcome-actions { display: flex; gap: 12px; justify-content: center; }

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* ============================================
   搜索页
   ============================================ */
.search-page-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.search-page-form input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.search-page-form select {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.result-count { color: var(--text-muted); margin-bottom: 16px; }
.result-section {
    margin: 24px 0 12px;
    font-size: 15px;
    color: var(--primary);
}
.search-results { display: flex; flex-direction: column; gap: 10px; }
.result-item {
    background: #fff;
    padding: 14px 16px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    font-size: 14px;
    line-height: 1.6;
}
.result-item .badge { margin-right: 8px; }
.result-item .author { font-weight: 600; margin-right: 6px; }
.result-item .time { float: right; color: var(--text-muted); font-size: 12px; }

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.sort-tabs { display: flex; gap: 4px; }
.sort-tabs a {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
}
.sort-tabs a.active { background: var(--primary); color: #fff; }
.sort-tabs a:hover:not(.active) { background: var(--bg); }

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-info { color: var(--text-muted); font-size: 12px; margin-right: 10px; }

/* ============================================
   空状态 / 其他
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: #fff;
    border-radius: var(--radius);
}
.empty-state .hint { font-size: 12px; margin-top: 8px; }
.empty { text-align: center; color: var(--text-muted); padding: 20px; }

.back-link { display: inline-block; margin-bottom: 12px; color: var(--text-muted); }
.back-link:hover { color: var(--primary); }

.hint { color: var(--text-muted); font-size: 13px; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.stat-box {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg);
    border-radius: var(--radius);
}
.stat-box .num { font-size: 24px; font-weight: 600; color: var(--primary); }
.stat-box .label { font-size: 12px; color: var(--text-muted); }

/* ============================================
   导入进度条
   ============================================ */
.progress-area { margin-top: 16px; }
.progress-bar {
    height: 20px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width .3s;
}
.progress-text { font-size: 13px; color: var(--text-muted); }

/* ============================================
   分类获取（留言/说说/相册页各自的直连获取条）
   ============================================ */
.cat-fetch-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.cat-fetch-meta { font-size: 13px; color: var(--text-muted); }
.cat-log {
    display: none;
    margin-bottom: 16px;
    background: #1e2530;
    color: #cfd8e3;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: Consolas, monospace;
    font-size: 12.5px;
    max-height: 190px;
    overflow-y: auto;
    white-space: pre-wrap;
}
.cat-log .err  { color: #ff7b72; }
.cat-log .warn { color: #e3b341; }
.cat-log .ok   { color: #7ee787; }

.result-area { margin-top: 16px; }

.steps {
    padding-left: 20px;
    line-height: 2;
}

/* ============================================
   表格
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.table tr:hover { background: #fafbfc; }
.table .small { font-size: 12px; color: var(--text-muted); }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: inline-flex; }

/* ============================================
   后台布局
   ============================================ */
.admin-body { background: #eef1f5; }

.admin-layout {
    display: flex;
    min-height: calc(100vh - 0px);
}
.admin-sidebar {
    width: 220px;
    background: #1e272e;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
}
.admin-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: 16px;
    font-weight: 600;
}
.admin-logo a { color: #fff; text-decoration: none; }

.admin-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}
.admin-nav a {
    display: block;
    padding: 10px 20px;
    color: #c8d6e5;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.admin-nav a.active {
    background: rgba(30,136,229,.15);
    color: #fff;
    border-left-color: var(--primary);
}

.admin-user {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}
.admin-user .nick { color: #fff; font-weight: 500; }
.admin-user a { color: #c8d6e5; font-size: 12px; }
.admin-user a:hover { color: #fff; }

.admin-main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: #fff;
    padding: 14px 24px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-topbar h1 { margin: 0; font-size: 18px; }
.admin-topbar .breadcrumb { font-size: 13px; color: var(--text-muted); }
.admin-topbar .breadcrumb a { color: var(--text-muted); }

.admin-content { padding: 24px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.admin-stat-box {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.admin-stat-box .num {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}
.admin-stat-box .label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .admin-sidebar { width: 60px; }
    .admin-sidebar .admin-nav a, .admin-sidebar .admin-user .nick,
    .admin-sidebar .admin-user a:not(:first-of-type) { display: none; }
    .admin-logo a span { display: none; }
    .admin-main { margin-left: 60px; }
}

/* ============================================
   底部
   ============================================ */
.site-footer {
    text-align: center;
    padding: 20px 16px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
