/* ========================================
   文章分发系统 — 国风新中式 + 现代管理后台
   用户端：宣纸白 · 朱砂红 · 藤黄 · 墨色
   管理端：保持磨砂玻璃现代风
   ======================================== */

/* ===== 国风色彩变量 ===== */
:root {
    /* 国风色系 */
    --ink: #2c2c2c;           /* 墨色 */
    --cinnabar: #c23a2e;      /* 朱砂红 */
    --cinnabar-light: #d94a3e;
    --gamboge: #d4a849;       /* 藤黄 */
    --gamboge-light: #e0bc6a;
    --xuan-paper: #faf8f0;    /* 宣纸白 */
    --xuan-paper-dark: #f3f0e4;
    --celadon: #e8f0e4;       /* 淡青 */
    --celadon-dark: #c5d9be;
    --light-ink: #5a5a5a;     /* 淡墨 */
    /* 管理端保持蓝色 */
    --admin-blue: #4a90d9;
    --admin-blue-dark: #357abd;
}

/* ===== 动画定义 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 1. 全局基调 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, "PingFang SC", -apple-system, "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 管理端样式 ===== */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 2. 管理端顶部导航 — 磨砂玻璃 ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: sticky;
    top: 10px;
    z-index: 50;
}

.admin-header h1 {
    font-size: 18px;
    color: #1a1a2e;
    font-weight: 700;
}

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

.admin-nav a {
    padding: 6px 14px;
    background: #f0f2f5;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.admin-nav a:hover {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.admin-nav a.active {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.admin-logout {
    padding: 6px 14px;
    background: none;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.admin-logout:hover {
    color: #e74c3c;
}

/* ===== 3. 卡片升级 ===== */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease both;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #1a1a2e;
    padding-left: 12px;
    border-left: 3px solid #4a90d9;
    font-weight: 600;
}

/* ===== 4. 表格美化 ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eef0f4;
    font-size: 14px;
}

table th {
    background: linear-gradient(135deg, #f5f7fa, #eef1f5);
    font-weight: 600;
    color: #555;
    letter-spacing: 0.5px;
    font-size: 13px;
    text-transform: none;
}

table tr:nth-child(even) {
    background: #f9fafb;
}

table tr:hover {
    background: #eef4fb;
    transition: background 0.2s ease;
}

/* ===== 7. 表单输入框 ===== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* ===== 5. 按钮渐变 ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a9ee0, #4088cc);
    box-shadow: 0 4px 16px rgba(74, 144, 217, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f05545, #d44233);
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-full {
    width: 100%;
}

.btn-ghost {
    background: #f0f2f5;
    color: #666;
}

.btn-ghost:hover {
    background: #e4e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== 6. Badge 标签 ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-active { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-suspended { background: #fce4ec; color: #c62828; border: 1px solid #f8bbd0; }
.badge-ongoing { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.badge-completed { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-failed { background: #fce4ec; color: #c62828; border: 1px solid #f8bbd0; }

/* ===== 11. Flash 提示信息 ===== */
.flash-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    animation: slideDown 0.35s ease both;
    position: relative;
    padding-left: 20px;
}

.flash-error {
    background: #fef2f2;
    color: #c62828;
    border-left: 4px solid #e74c3c;
}

.flash-success {
    background: #f0fdf4;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

/* ===== 8. 登录页 ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f0f2f5 0%, #e3e8f0 100%);
}

.login-box {
    width: 100%;
    max-width: 360px;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90d9, #67b26f, #4a90d9);
    background-size: 200% 100%;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
    color: #1a1a2e;
    font-weight: 700;
}

/* ===== 用户端国风登录页 ===== */
.login-container.user-login {
    background: linear-gradient(160deg, var(--xuan-paper) 0%, var(--xuan-paper-dark) 40%, var(--celadon) 100%);
}

.login-container.user-login .login-box {
    background: var(--xuan-paper);
    border: 1px solid rgba(212, 168, 73, 0.2);
    box-shadow: 0 8px 32px rgba(44, 44, 44, 0.1);
}

.login-container.user-login .login-box::before {
    background: linear-gradient(90deg, var(--cinnabar), var(--gamboge), var(--cinnabar));
    background-size: 200% 100%;
}

.login-container.user-login .login-box h1 {
    color: var(--ink);
    font-family: "Noto Serif SC", "STSong", "SimSun", serif;
    font-size: 22px;
    letter-spacing: 2px;
}

.login-container.user-login .btn-primary {
    background: linear-gradient(135deg, var(--cinnabar), #a8301f);
    box-shadow: 0 2px 8px rgba(194, 58, 46, 0.25);
}

.login-container.user-login .btn-primary:hover {
    background: linear-gradient(135deg, var(--cinnabar-light), var(--cinnabar));
    box-shadow: 0 4px 16px rgba(194, 58, 46, 0.4);
}

.login-container.user-login .form-group input:focus {
    border-color: var(--gamboge);
    box-shadow: 0 0 0 3px rgba(212, 168, 73, 0.15);
}

/* ===== 用户端样式（移动端适配）— 国风 ===== */
.user-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
    padding-bottom: 70px;
    background: var(--xuan-paper);
}

.user-header {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.user-header h1 {
    font-size: 22px;
    color: var(--ink);
    font-weight: 700;
    font-family: "Noto Serif SC", "STSong", "SimSun", serif;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

/* 标题装饰线 */
.user-header h1::before,
.user-header h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gamboge));
}

.user-header h1::before {
    right: calc(100% + 10px);
    background: linear-gradient(90deg, transparent, var(--gamboge));
}

.user-header h1::after {
    left: calc(100% + 10px);
    background: linear-gradient(270deg, transparent, var(--gamboge));
}

.user-header .greeting {
    font-size: 14px;
    color: var(--light-ink);
    margin-top: 8px;
}

/* ===== 用户端卡片国风化 ===== */
.user-container .card {
    background: var(--xuan-paper);
    border: 1px solid rgba(212, 168, 73, 0.15);
    box-shadow: 0 2px 12px rgba(44, 44, 44, 0.04);
}

.user-container .card:hover {
    box-shadow: 0 4px 20px rgba(44, 44, 44, 0.08);
}

.user-container .card h2 {
    color: var(--ink);
    border-left-color: var(--cinnabar);
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-muted { color: #888; font-size: 14px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

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

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    min-width: 700px;
}

.table-scroll.table-scroll-sm table {
    min-width: 520px;
}

.table-scroll.table-scroll-lg table {
    min-width: 920px;
}

.token-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.token-input {
    flex: 1;
    font-family: monospace;
    background: #fafafa;
}

.api-example {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
    border: 1px solid #eee;
}

.inline-form {
    display: inline;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    font-size: 14px;
}

/* ===== 挑战进度卡片 — 国风 ===== */
.challenge-card {
    text-align: center;
}

.challenge-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.progress-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-day {
    font-size: 28px;
    font-weight: 700;
    color: var(--cinnabar);
    font-family: "Noto Serif SC", "STSong", "SimSun", serif;
}

.progress-total {
    font-size: 13px;
    color: var(--light-ink);
}

.progress-info {
    text-align: left;
}

.progress-info p {
    font-size: 14px;
    margin-bottom: 3px;
}

.progress-info strong {
    color: var(--cinnabar);
    font-size: 18px;
}

/* ===== 9. 进度条 — 红金渐变 ===== */
.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--xuan-paper-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cinnabar), var(--gamboge), var(--cinnabar));
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.3s;
    min-width: 2%;
    animation: shimmer 2.5s ease-in-out infinite;
}

.progress-label {
    font-size: 12px;
    color: var(--light-ink);
}

/* ===== 文章卡片 — 国风 ===== */
.article-card h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--ink);
}

.article-content {
    margin-bottom: 20px;
}

.article-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    line-height: 1.5;
    font-family: "Noto Serif SC", "STSong", "SimSun", serif;
}

.article-body {
    font-size: 15px;
    color: #444;
    line-height: 2;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: #fffef8;
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 73, 0.15);
}

.article-actions {
    margin-top: 15px;
}

/* 用户端按钮国风化 */
.user-container .btn-primary {
    background: linear-gradient(135deg, var(--cinnabar), #a8301f);
    box-shadow: 0 2px 8px rgba(194, 58, 46, 0.25);
}

.user-container .btn-primary:hover {
    background: linear-gradient(135deg, var(--cinnabar-light), var(--cinnabar));
    box-shadow: 0 4px 16px rgba(194, 58, 46, 0.4);
}

.btn-checkin {
    font-size: 16px;
    padding: 14px 20px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cinnabar), var(--gamboge)) !important;
    box-shadow: 0 3px 12px rgba(194, 58, 46, 0.3) !important;
    letter-spacing: 1px;
}

.btn-checkin:hover {
    background: linear-gradient(135deg, var(--cinnabar-light), var(--gamboge-light)) !important;
    box-shadow: 0 5px 20px rgba(194, 58, 46, 0.4) !important;
}

.user-container .btn-ghost {
    background: var(--xuan-paper-dark);
    color: var(--light-ink);
    border: 1px solid rgba(212, 168, 73, 0.2);
}

.user-container .btn-ghost:hover {
    background: var(--celadon);
    border-color: var(--celadon-dark);
}

.checkin-done {
    text-align: center;
    padding: 30px 0;
}

.checkin-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.checkin-done p {
    font-size: 16px;
    color: #2e7d32;
    font-weight: 500;
}

.no-article {
    text-align: center;
    padding: 30px 0;
}

.no-article p:first-child {
    font-size: 18px;
    margin-bottom: 8px;
}

/* ===== 用户端底部导航 — 墨色 + 朱砂高亮 ===== */
.user-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: rgba(44, 44, 44, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212, 168, 73, 0.2);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.15);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    gap: 2px;
    padding: 4px 12px;
    transition: all 0.2s ease;
}

.nav-item span:first-child {
    font-size: 20px;
}

.nav-item.active {
    color: var(--gamboge);
}

.nav-item:hover {
    color: var(--gamboge);
}

/* ===== 打卡记录网格 — 国风配色 ===== */
.checkin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.checkin-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: 10px;
    background: var(--xuan-paper-dark);
    border: 1px solid rgba(212, 168, 73, 0.1);
    transition: all 0.2s ease;
}

.checkin-day:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(44, 44, 44, 0.08);
}

.checkin-day.checked {
    background: var(--celadon);
    border-color: var(--celadon-dark);
}

.checkin-day.missed {
    background: #fdf0ee;
    border-color: rgba(194, 58, 46, 0.2);
}

.checkin-day.today {
    background: #fdf8e8;
    border-color: rgba(212, 168, 73, 0.3);
}

.day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.day-date {
    font-size: 11px;
    color: var(--light-ink);
    margin-bottom: 4px;
}

.day-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.day-time {
    font-size: 10px;
    color: #888;
}

/* ===== 用户端个人中心 — 国风 ===== */
.user-container .profile-card h2 {
    color: var(--ink);
    border-left-color: var(--cinnabar);
}

.user-container .profile-info {
    border-top: 1px solid rgba(212, 168, 73, 0.15);
}

.user-container .profile-row {
    border-bottom: 1px solid rgba(212, 168, 73, 0.1);
}

.user-container .profile-row:hover {
    background: var(--xuan-paper-dark);
}

.user-container .profile-label {
    color: var(--light-ink);
}

.user-container .profile-value {
    color: var(--ink);
    font-weight: 500;
}

.user-container .btn-danger {
    background: linear-gradient(135deg, var(--cinnabar), #a8301f);
    box-shadow: 0 2px 8px rgba(194, 58, 46, 0.25);
}

.user-container .btn-danger:hover {
    background: linear-gradient(135deg, var(--cinnabar-light), var(--cinnabar));
}

/* ===== 用户端表单国风化 ===== */
.user-container .form-group input:focus,
.user-container .form-group select:focus,
.user-container .form-group textarea:focus {
    border-color: var(--gamboge);
    box-shadow: 0 0 0 3px rgba(212, 168, 73, 0.15);
}

/* ===== 管理端文章池 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 6px 10px;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.25s ease;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.article-preview {
    max-height: 80px;
    overflow: hidden;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.warning-text {
    color: #e65100;
    font-weight: 500;
}

/* ===== 管理端挑战金 ===== */
.challenge-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.challenge-day-cell {
    text-align: center;
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 11px;
    background: #f8f9fb;
    border: 1px solid #eef0f4;
    transition: all 0.2s ease;
}

.challenge-day-cell:hover {
    transform: scale(1.05);
}

.challenge-day-cell.checked { background: #e8f5e9; border-color: #c8e6c9; }
.challenge-day-cell.missed { background: #fce4ec; border-color: #f8bbd0; }

/* ===== 10. 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90d9, #357abd);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, #67b26f, #4ca854);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, #ffa726, #fb8c00);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-card:nth-child(2) .stat-number {
    background: linear-gradient(135deg, #67b26f, #4ca854);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(3) .stat-number {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(4) .stat-number {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 12px;
    color: #999;
}

/* ===== 收入相关 badge ===== */
.badge-paid { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-pending { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* ===== 个人中心 ===== */
.profile-card h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.profile-info {
    border-top: 1px solid #eef0f4;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
    transition: background 0.2s ease;
}

.profile-row:hover {
    background: #f8f9fb;
}

.profile-label {
    color: #888;
}

.profile-value {
    color: #333;
    font-weight: 500;
}

/* ===== Dashboard 仪表盘专属样式 ===== */
.dashboard-section {
    margin-bottom: 24px;
}

.dashboard-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 3px solid #4a90d9;
}

/* 今日快报 */
.today-report {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fb;
    border-radius: 10px;
    border: 1px solid #eef0f4;
    transition: all 0.2s ease;
}

.report-item:hover {
    background: #eef4fb;
    border-color: #bbdefb;
}

.report-item.warning {
    background: #fff8f0;
    border-color: #ffe0b2;
}

.report-item.warning:hover {
    background: #fff3e0;
}

.report-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.report-info {
    flex: 1;
}

.report-info .report-num {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.report-info .report-label {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: #f8f9fb;
    border-radius: 10px;
    border: 1px solid #eef0f4;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.quick-action-btn .action-icon {
    font-size: 26px;
}

/* 缺文章预警列表 */
.warning-list {
    list-style: none;
    padding: 0;
}

.warning-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #eef0f4;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warning-list li:last-child {
    border-bottom: none;
}

.warning-list .user-name {
    font-weight: 500;
    color: #333;
}

.warning-list .remaining {
    color: #e65100;
    font-weight: 600;
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .admin-container {
        padding: 12px;
    }

    .admin-header {
        position: static;
        top: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .admin-header h1 {
        font-size: 16px;
        text-align: center;
    }

    .admin-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        padding-bottom: 2px;
    }

    .admin-nav::-webkit-scrollbar {
        display: none;
    }

    .admin-nav a {
        white-space: nowrap;
        flex: 0 0 auto;
        padding: 6px 12px;
    }

    .admin-logout {
        align-self: flex-end;
        padding: 0;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 6px;
    }

    .checkin-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .challenge-progress {
        flex-direction: column;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .today-report {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .card {
        padding: 14px;
    }

    .card-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .card-header-actions {
        width: 100%;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
    }

    .filter-bar select,
    .filter-bar input,
    .filter-bar .btn {
        width: 100%;
    }

    .token-row {
        flex-direction: column;
        align-items: stretch;
    }
}
