/* Typecho 应用中心 - 管理后台样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f7fa;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
    color: #667eea;
}

.login-box h2 {
    font-size: 18px;
    margin-bottom: 30px;
    text-align: center;
    color: #666;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    margin: 0 10px;
}

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

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item span {
    margin-right: 10px;
    font-size: 18px;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.user-info {
    margin-right: 15px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #67c23a;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 5px;
}

.content {
    flex: 1;
    padding: 30px;
}

.footer {
    padding: 20px 30px;
    text-align: center;
    color: #909399;
    font-size: 12px;
    border-top: 1px solid #e4e7ed;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 14px;
    color: #909399;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-detail {
    font-size: 12px;
    color: #909399;
    display: flex;
    gap: 15px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: white;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #606266;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn:hover {
    color: #667eea;
    border-color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #606266;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 表格 */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.data-table thead {
    background: #f5f7fa;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e4e7ed;
}

.data-table th {
    font-weight: 600;
    color: #606266;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: #f5f7fa;
}

/* 状态标签 */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.status-draft {
    background: #f4f4f5;
    color: #909399;
}

.status-pending {
    background: #fdf6ec;
    color: #e6a23c;
}

.status-approved {
    background: #f0f9ff;
    color: #67c23a;
}

.status-rejected {
    background: #fef0f0;
    color: #f56c6c;
}

/* 警告框 */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.alert-success {
    background: #f0f9ff;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.alert-info {
    background: #f4f4f5;
    color: #909399;
    border: 1px solid #d3d4d6;
}

/* 快速操作 */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.quick-actions .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 最新应用 */
.recent-apps {
    margin-bottom: 30px;
}

.recent-apps h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

