* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-hover: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 加载页面 */
.loading-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.loading-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
}

.loading-container {
    text-align: center;
    position: relative;
    z-index: 1;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loading-container p {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

/* 登录页面 */
#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

#login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    background: var(--card-bg);
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-container::after {
    content: '🔐';
    display: block;
    text-align: center;
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    margin-right: 8px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-message {
    color: #991b1b;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fee2e2;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: '⚠️';
    font-size: 18px;
}

.success-message {
    color: #065f46;
    margin-top: 16px;
    padding: 12px 16px;
    background: #d1fae5;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
}

/* 主布局 */
.main-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
}

/* 左侧菜单栏 */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(0); /* PC端默认显示 */
}

/* 自定义滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* PC端：侧边栏始终显示 */
@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0) !important;
        display: flex !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    border-radius: 10px;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 4px 4px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), rgba(102, 126, 234, 0.03));
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), rgba(102, 126, 234, 0.05));
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    height: 60%;
}

.nav-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
    transition: transform 0.25s ease;
    display: none;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    flex: 1;
    letter-spacing: 0.3px;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-info:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.user-info:hover .user-avatar {
    transform: scale(1.05) rotate(5deg);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-block {
    width: 100%;
}

/* 主内容区 */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - 280px);
    background: var(--bg-color);
}

.header {
    padding: 24px 48px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.header-left h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-menu-toggle {
    display: none;
    padding: 8px 12px;
    border: none;
    background: var(--bg-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.btn-menu-toggle:hover {
    background: var(--border-color);
}


.main-content {
    padding: 32px 48px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.4;
    animation: float 3s ease-in-out infinite;
    display: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 卡片样式优化 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.card-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

.tab-content h2 {
    margin-bottom: 28px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.data-table {
    width: 100%;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.data-table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    border-bottom: none;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

.data-table th:first-child {
    padding-left: 24px;
}

.data-table th:last-child {
    padding-right: 24px;
}

.data-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.data-table td:first-child {
    padding-left: 24px;
}

.data-table td:last-child {
    padding-right: 24px;
}

.data-table tbody tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.02));
    transform: translateX(4px);
    box-shadow: -4px 0 0 0 var(--primary-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.status-draft,
.status-pending {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}

.status-published,
.status-fixed {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
}

.status-archived,
.status-reviewing {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

.status-rejected {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}

.priority-low {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}

.priority-medium {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.priority-high {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fed7aa;
    color: #9a3412;
}

.priority-critical {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}

/* 更新类型样式 */
.type-frontend {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

.type-backend {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.type-full {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
}

/* 角色样式 */
.role-admin {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}

.role-editor {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.role-viewer {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

/* Bug状态增强 */
.status-accepted {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

.status-fixing {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

/* 模态框样式 */
/* 模态框过渡动画 */
.modal-fade-enter-active, .modal-fade-leave-active {
    transition: opacity 0.3s ease;
}

.modal-fade-enter, .modal-fade-leave-to {
    opacity: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.action-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.form-section {
    max-width: 500px;
}

.filter-bar {
    margin-bottom: 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.filter-bar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.filter-bar select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 响应式设计 - 平板和移动端 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .btn-menu-toggle {
        display: block; /* 移动端显示菜单切换按钮 */
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header {
        padding: 20px 24px;
    }
    
    .header-left h2 {
        font-size: 20px;
    }
}


/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式表格 */
@media (max-width: 768px) {
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* PC端样式 - 确保侧边栏始终显示 */
@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0) !important;
        position: fixed !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    .sidebar-overlay {
        display: none !important;
        visibility: hidden !important;
    }
    
    .btn-menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
    
    .main-wrapper {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
    }
    
    .main-layout {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header-left h2 {
        font-size: 18px;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar select {
        width: 100%;
    }
    
    .nav-item {
        padding: 12px 16px;
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .sidebar-footer {
        padding: 16px;
    }
}

/* 侧边栏滚动条美化 */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 遮罩层 - 仅移动端使用 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* PC端隐藏遮罩层 */
@media (min-width: 1025px) {
    .sidebar-overlay {
        display: none !important;
    }
}

/* 移动端显示遮罩层 */
@media (max-width: 1024px) {
    .sidebar-overlay.show {
        display: block;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state::before {
    content: '📦';
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 表单美化 */
.login-form {
    margin-top: 30px;
}

/* 输入框图标 */
.form-group input[type="text"]::before,
.form-group input[type="password"]::before {
    content: '';
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* 文件上传样式 */
input[type="file"] {
    padding: 8px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 工具提示 */
[title] {
    cursor: help;
}

/* 响应式表格 */
@media (max-width: 1024px) {
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 动画增强 */
.btn, .nav-tabs button, .data-table tbody tr {
    will-change: transform;
}

/* 焦点可见性 */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 代码仓库管理样式 */
.miniprogram-tab {
    padding: 0;
}

/* 顶部标题栏 */
.miniprogram-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.header-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-lg .btn-icon {
    font-size: 20px;
}

.btn-lg:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 统计卡片 */
.miniprogram-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* 确保统计卡片在1920px下正常显示 */
@media (min-width: 1921px) {
    .miniprogram-stats {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 主要内容区域 */
.miniprogram-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-left,
.content-right {
    min-width: 0; /* 防止内容溢出 */
}

.section-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.title-icon {
    font-size: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.section-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

/* 配置列表 */
.config-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.config-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.config-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.config-name-group {
    flex: 1;
}

.config-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.config-appid {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.config-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.config-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-icon {
    font-size: 14px;
}

.config-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.config-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-disabled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-uploading {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.config-body {
    flex: 1;
    margin-bottom: 16px;
}

.config-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
}

.config-label {
    color: var(--text-secondary);
    min-width: 80px;
    font-weight: 500;
}

.config-value {
    color: var(--text-primary);
    word-break: break-all;
}

.config-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.upload-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.upload-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.upload-item.upload-success {
    border-left: 4px solid var(--success-color);
}

.upload-item.upload-failed {
    border-left: 4px solid var(--danger-color);
}

.upload-item.upload-uploading {
    border-left: 4px solid var(--info-color);
}

.upload-item.upload-pending {
    border-left: 4px solid var(--warning-color);
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.upload-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.upload-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-config-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-version {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.upload-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 80px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
}

.upload-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #991b1b;
    font-size: 14px;
}

.error-icon {
    font-size: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-hover);
}

.error-message {
    font-size: 13px;
    color: #991b1b;
    line-height: 1.6;
    word-break: break-word;
}

/* 响应式设计 */
/* 1920x1080 及以下优化 */
@media (max-width: 1920px) {
    .miniprogram-content {
        gap: 20px;
    }
    
    .miniprogram-header {
        padding: 28px;
    }
    
    .header-title h2 {
        font-size: 26px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 26px;
    }
}

/* 1600px 及以下，调整布局 */
@media (max-width: 1600px) {
    .miniprogram-content {
        gap: 18px;
    }
    
    .miniprogram-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* 1200px 及以下，改为单列布局 */
@media (max-width: 1200px) {
    .miniprogram-content {
        grid-template-columns: 1fr;
    }
    
    .section-body {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .miniprogram-header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .btn-lg {
        flex: 1;
        justify-content: center;
    }
    
    .miniprogram-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-body {
        padding: 16px;
    }
    
    .config-card {
        padding: 16px;
    }
    
    .upload-item {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .miniprogram-stats {
        grid-template-columns: 1fr;
    }
    
    .header-title h2 {
        font-size: 22px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

