/* ========== 动漫风格 - 十一的任务管理系统 ========== */

/* ========== CSS 变量 ========== */
:root {
    --primary: #FF6B9D;
    --primary-light: #FF8FB8;
    --primary-dark: #E8507A;
    --primary-glow: rgba(255,107,157,0.3);
    --secondary: #7C5CFC;
    --secondary-light: #9B82FC;
    --accent-blue: #4ECDC4;
    --accent-yellow: #FFE66D;
    --accent-orange: #FF8A5C;
    --success: #51CF66;
    --warning: #FFD43B;
    --danger: #FF6B6B;
    --info: #74C0FC;
    --bg: #F8F0FF;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #2D1B4E;
    --text-secondary: #6B5B7B;
    --text-light: #A99BBF;
    --border: #E8DFF5;
    --border-light: #F3ECFA;
    --shadow: 0 2px 16px rgba(125,92,252,0.08);
    --shadow-lg: 0 8px 32px rgba(125,92,252,0.12);
    --shadow-glow: 0 0 20px rgba(255,107,157,0.2);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --font-display: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}

/* ========== Google Fonts ========== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

/* ========== 无障碍 & Focus ========== */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* ========== 减少动画 ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.hidden { display: none !important; }

/* ========== 登录页 ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: loginBgFloat 8s ease-in-out infinite;
}

@keyframes loginBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(5deg); }
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    text-align: center;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.6);
    animation: cardFloat 0.6s ease-out;
}

@keyframes cardFloat {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    margin-bottom: 32px;
}

.login-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: inline-block;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-header h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    background: var(--bg-white);
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ========== 管理后台布局 ========== */
.admin-page {
    display: flex;
    min-height: 100vh;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2D1B4E 0%, #1A0E33 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid rgba(124,92,252,0.2);
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-icon {
    font-size: 30px;
    animation: iconBounce 3s ease-in-out infinite;
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, #FF8FB8, #FFE66D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    position: relative;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    border-radius: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255,107,157,0.2), rgba(124,92,252,0.1));
    color: var(--primary-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-badge {
    background: linear-gradient(135deg, var(--danger), var(--primary));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(255,107,107,0.1);
    color: #FF8A8A;
    border: 1px solid rgba(255,107,107,0.2);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-logout:hover {
    background: rgba(255,107,107,0.2);
    transform: scale(1.02);
}

/* ========== 主内容区 ========== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.topbar-time {
    font-size: 13px;
    color: var(--text-light);
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
}

.btn-menu {
    display: none;
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 18px;
    margin-right: 12px;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-menu:hover {
    border-color: var(--primary);
    background: rgba(255,107,157,0.05);
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-sync {
    padding: 8px 18px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    color: var(--text-secondary);
}

.btn-sync:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
}

/* ========== 页面内容 ========== */
.page-content {
    padding: 24px 32px;
}

/* ========== 卡片 ========== */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s ease;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
}

.section-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    margin-bottom: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========== 按钮 ========== */
.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-body);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(255,107,157,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,107,157,0.4);
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e63e40) !important;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3) !important;
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(255,107,107,0.4) !important;
}

.btn-secondary {
    padding: 10px 24px;
    background: var(--bg);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--text-light);
    transform: translateY(-1px);
}

.btn-add {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--secondary), #6B4FE0);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-body);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(124,92,252,0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124,92,252,0.4);
}

.btn-export {
    padding: 8px 18px;
    background: #E8F8F0;
    color: #20C997;
    border: 1px solid #B2F2D0;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-export:hover {
    background: #D0F5E5;
    transform: translateY(-1px);
}

.btn-upload {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: transform 0.15s ease, background-color 0.2s ease;
}

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

.btn-edit {
    background: #E8F0FE;
    color: #4C7CF5;
}

.btn-edit:hover {
    background: #D0E0FC;
}

.btn-delete {
    background: #FFE8E8;
    color: #FF6B6B;
}

.btn-delete:hover {
    background: #FFD0D0;
}

.btn-approve {
    background: #E8F8F0;
    color: #20C997;
}

.btn-approve:hover {
    background: #D0F5E5;
}

.btn-reject {
    background: #FFE8E8;
    color: #FF6B6B;
}

.btn-reject:hover {
    background: #FFD0D0;
}

.btn-complete {
    background: #E8F8F0;
    color: #20C997;
}

.btn-complete:hover {
    background: #D0F5E5;
}

.btn-revoke {
    background: #FFF8E1;
    color: #FFB020;
}

.btn-revoke:hover {
    background: #FFECB3;
}

.btn-cancel {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    border-color: var(--text-light);
}

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

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 500;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(124,92,252,0.03);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

.th-check {
    width: 40px;
    text-align: center;
}

.th-check input[type="checkbox"],
.data-table td input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--secondary);
}

/* ========== 状态徽章 ========== */
.badge-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-add {
    background: #E8F8F0;
    color: #20C997;
}

.badge-minus {
    background: #FFE8E8;
    color: #FF6B6B;
}

.badge-pending {
    background: #FFF8E1;
    color: #F0A020;
}

.badge-approved {
    background: #E8F8F0;
    color: #20C997;
}

.badge-rejected {
    background: #FFE8E8;
    color: #FF6B6B;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-group.inline {
    display: inline-block;
    width: auto;
    margin-right: 16px;
    vertical-align: top;
}

.form-group.inline input,
.form-group.inline select {
    width: 180px;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-input {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-white);
    min-width: 180px;
}

.filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-select {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    background: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    border-color: var(--primary);
}

.filter-date {
    width: 140px;
    min-width: 140px;
}

.filter-sep {
    color: var(--text-light);
    font-size: 13px;
}

/* ========== 批量操作栏 ========== */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #E8F0FE, #F0E8FE);
    border-radius: var(--radius);
    border: 1px solid #C8D8FE;
}

.batch-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 8px;
    font-weight: 600;
}

/* ========== 积分概览 ========== */
.score-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.score-card {
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
}

.score-card:hover {
    transform: translateY(-3px);
}

.score-card:nth-child(1) {
    background: linear-gradient(135deg, #FF6B9D, #FF8FB8);
}

.score-card:nth-child(2) {
    background: linear-gradient(135deg, #7C5CFC, #9B82FC);
}

.score-card:nth-child(3) {
    background: linear-gradient(135deg, #4ECDC4, #6FE0D8);
}

.score-card:nth-child(4) {
    background: linear-gradient(135deg, #FFD43B, #FFE66D);
}

.score-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
    position: relative;
}

.score-value {
    font-size: 36px;
    font-weight: 900;
    font-family: var(--font-display);
    position: relative;
}

/* ========== 积分调整 ========== */
.score-adjust {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.score-adjust .btn-primary {
    margin-top: 22px;
}

/* ========== 成就网格 ========== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.badge-card {
    padding: 24px 20px;
    background: linear-gradient(135deg, var(--bg), var(--border-light));
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.badge-card:hover::before {
    opacity: 1;
}

.badge-card-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.badge-card-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.badge-card-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.badge-card-time {
    font-size: 11px;
    color: var(--text-light);
}

.badge-card-manual {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #E8F0FE, #F0E8FE);
    color: var(--secondary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}

/* ========== 授予成就表单 ========== */
.grant-badge-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.grant-badge-form .btn-primary {
    margin-top: 22px;
}

/* ========== 弹窗 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45,27,78,0.4);
    backdrop-filter: blur(4px);
    overscroll-behavior: contain;
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overscroll-behavior: contain;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* ========== 自定义确认弹窗 ========== */
.confirm-dialog-content {
    width: 400px;
    text-align: center;
    padding: 36px 24px 24px;
}

.confirm-icon {
    font-size: 52px;
    margin-bottom: 16px;
    display: inline-block;
    animation: iconBounce 1.5s ease-in-out infinite;
}

.confirm-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
    white-space: pre-line;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 2000;
    animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
    aria-live: polite;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-success { background: linear-gradient(135deg, #51CF66, #40C057); }
.toast-error { background: linear-gradient(135deg, #FF6B6B, #E03131); }
.toast-warning { background: linear-gradient(135deg, #FFD43B, #F59F00); color: var(--text-primary); }
.toast-info { background: linear-gradient(135deg, #74C0FC, #339AF0); }

/* ========== Loading ========== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248,240,255,0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 32px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

/* ========== 积分变动 ========== */
.points-positive {
    color: var(--success);
    font-weight: 700;
}

.points-negative {
    color: var(--danger);
    font-weight: 700;
}

/* ========== 记录汇总 ========== */
.records-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--bg), var(--border-light));
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.records-summary strong {
    color: var(--text-primary);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.pagination button {
    padding: 6px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    color: var(--text-secondary);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
}

.pagination button.active {
    background: linear-gradient(135deg, var(--secondary), #6B4FE0);
    color: #fff;
    border-color: var(--secondary);
    box-shadow: 0 2px 8px rgba(124,92,252,0.3);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .page-info {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 4px;
    font-variant-numeric: tabular-nums;
}

/* ========== 数据总览 ========== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-orange .stat-icon { background: linear-gradient(135deg, #FFF0F6, #FFE0EB); }
.stat-orange::after { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-blue .stat-icon { background: linear-gradient(135deg, #E8F0FE, #D0E0FC); }
.stat-blue::after { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.stat-green .stat-icon { background: linear-gradient(135deg, #E8F8F0, #D0F5E5); }
.stat-green::after { background: linear-gradient(90deg, var(--accent-blue), #6FE0D8); }
.stat-yellow .stat-icon { background: linear-gradient(135deg, #FFFBE6, #FFF3C4); }
.stat-yellow::after { background: linear-gradient(90deg, #FFD43B, #FFE66D); }
.stat-purple .stat-icon { background: linear-gradient(135deg, #F3ECFA, #E8DFF5); }
.stat-purple::after { background: linear-gradient(90deg, var(--secondary), #B794F6); }
.stat-pink .stat-icon { background: linear-gradient(135deg, #FFF0F6, #FFE0EB); }
.stat-pink::after { background: linear-gradient(90deg, #FF6B9D, #FF8FB8); }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-half {
    margin-bottom: 0;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 220px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ========== 最近操作记录 ========== */
.recent-logs {
    max-height: 240px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.log-dot.task { background: var(--secondary); }
.log-dot.gift { background: var(--primary); }
.log-dot.score { background: var(--warning); }
.log-dot.exchange { background: var(--success); }
.log-dot.badge { background: #B794F6; }
.log-dot.birthday { background: #FF8FB8; }
.log-dot.backup { background: var(--accent-blue); }
.log-dot.system { background: var(--text-light); }

.log-text {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.5;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-time {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ========== 待办提醒 ========== */
.reminders-list {
    max-height: 240px;
    overflow-y: auto;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-icon {
    font-size: 20px;
}

.reminder-text {
    flex: 1;
    color: var(--text-secondary);
    font-weight: 500;
}

.reminder-tag {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.reminder-tag.urgent {
    background: #FFE8E8;
    color: #FF6B6B;
}

.reminder-tag.normal {
    background: #FFF8E1;
    color: #F0A020;
}

.reminder-tag.info {
    background: #E8F0FE;
    color: var(--secondary);
}

/* ========== 备份相关 ========== */
.backup-section {
    margin-bottom: 16px;
}

.backup-desc {
    margin-bottom: 16px;
}

.backup-desc p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.backup-hint {
    font-size: 12px !important;
    color: var(--text-light) !important;
}

.backup-hint code {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
}

.backup-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.backup-list {
    margin-top: 16px;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--bg), var(--border-light));
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    border: 1px solid var(--border-light);
}

.backup-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.backup-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backup-meta {
    font-size: 12px;
    color: var(--text-light);
}

.backup-actions-inline {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .score-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .btn-menu {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .score-overview {
        grid-template-columns: 1fr;
    }

    .score-adjust,
    .grant-badge-form {
        flex-direction: column;
    }

    .form-group.inline {
        width: 100%;
        margin-right: 0;
    }

    .form-group.inline input,
    .form-group.inline select {
        width: 100%;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input,
    .filter-select {
        min-width: auto;
        width: 100%;
    }

    .filter-sep {
        display: none;
    }

    .batch-bar {
        flex-wrap: wrap;
    }

    .records-summary {
        flex-direction: column;
        gap: 8px;
    }

    .stat-value {
        font-size: 24px;
    }

    .score-value {
        font-size: 28px;
    }
}
