/* =====================================================
   协作空间 - 设计系统
   现代化极简、明亮主题
   ===================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ---------- CSS 自定义属性 ---------- */
:root {
    /* 主色调 */
    --primary: #6366f1;
    --primary-light: #4f46e5;
    --primary-dark: #4338ca;
    --primary-glow: rgba(99, 102, 241, 0.2);

    /* 语义色 */
    --success: #059669;
    --success-light: #10b981;
    --warning: #d97706;
    --warning-light: #f59e0b;
    --danger: #dc2626;
    --danger-light: #ef4444;
    --info: #2563eb;
    --info-light: #3b82f6;

    /* 浅色主题 */
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(0, 0, 0, 0.02);
    --bg-hover: rgba(99, 102, 241, 0.04);
    --bg-input: rgba(0, 0, 0, 0.03);

    /* 文字 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* 边框 */
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-focus: rgba(99, 102, 241, 0.5);

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 布局 */
    --sidebar-width: 260px;
    --topbar-height: 60px;

    /* 字体 */
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ---------- 动画背景 ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- 主布局 ---------- */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-glow);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
    color: var(--primary);
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-link .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: white;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- 主内容区 ---------- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-content {
    padding: 32px;
    max-width: 1400px;
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- 统计卡片 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-light);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--text-inverse);
}

.btn-warning:hover {
    background: var(--warning-light);
    color: var(--text-inverse);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-light);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
}

/* ---------- 表单 ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(255, 255, 255, 1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- 表格 ---------- */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.table tbody tr:hover td {
    background: var(--bg-hover);
}

.table .checkbox-col {
    width: 40px;
    text-align: center;
}

/* ---------- 标签/状态 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-in_progress {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-under_review {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-accepted {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-light);
}

.badge-low {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.badge-medium {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-urgent {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-banned {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 13px;
    margin-bottom: 24px;
}

/* ---------- 通知/闪存消息 ---------- */
.flash-message {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.flash-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* ---------- 模态框 ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- 任务时间线 ---------- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-secondary);
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-content {
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-user {
    color: var(--primary);
    font-weight: 500;
}

/* ---------- 进度条 ---------- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.progress-danger .progress-fill {
    background: linear-gradient(90deg, var(--warning), var(--danger));
}

/* ---------- 标签页 ---------- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-link {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab-link:hover {
    color: var(--text-primary);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ---------- 搜索栏 ---------- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-bar input {
    flex: 1;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.search-bar .icon {
    color: var(--text-muted);
}

/* ---------- 分隔/布局辅助 ---------- */
.flex {
    display: flex;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-gap-sm {
    gap: 8px;
}

.flex-gap {
    gap: 12px;
}

.flex-gap-lg {
    gap: 20px;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.mr-1 {
    margin-right: 8px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 12px;
}

.text-xs {
    font-size: 11px;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.hidden {
    display: none !important;
}

/* ---------- 动画 ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-in {
    animation: slideIn 0.3s ease;
}

.animate-up {
    animation: slideUp 0.3s ease;
}

/* ---------- 任务卡片 ---------- */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    color: inherit;
}

.task-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.task-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- 成果列表 ---------- */
.deliverable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition);
}

.deliverable-item:hover {
    background: var(--bg-hover);
}

.deliverable-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.deliverable-icon.text {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.deliverable-icon.link {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.deliverable-icon.file {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.deliverable-info {
    flex: 1;
    min-width: 0;
}

.deliverable-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deliverable-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- 评论区 ---------- */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-user {
    font-size: 13px;
    font-weight: 600;
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- 等级指示器 ---------- */
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.level-low {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.level-mid {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.level-high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.level-top {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.level-owner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
    color: var(--primary);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 16px;
    }
}

/* ---------- 认证页面 ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---------- 复选框自定义 ---------- */
.checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    font-size: 11px;
    color: white;
    font-weight: 700;
}

/* ---------- 工具提示 ---------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border: 1px solid var(--border);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* ---------- 存储使用量 ---------- */
.storage-usage {
    display: flex;
    align-items: center;
    gap: 12px;
}

.storage-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--success), var(--primary));
}

.storage-fill.warning {
    background: linear-gradient(90deg, var(--warning), var(--danger));
}

.storage-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--font-mono);
}

/* ---------- 移动端菜单按钮 ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}