/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand a {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-menu a {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: #007bff;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid #eee;
}

.navbar-user span {
    color: #666;
}

/* 主内容区 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

/* 登录页面 */
.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: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007bff;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 卡片 */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    color: #333;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-info {
    width: 100%;
    border-collapse: collapse;
}

.table-info th {
    width: 150px;
    padding: 10px;
    text-align: right;
    background: #f8f9fa;
    font-weight: 600;
}

.table-info td {
    padding: 10px;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #ffc107;
    color: #000;
}

.status-collecting,
.status-rewriting,
.status-distributing {
    background: #17a2b8;
    color: #fff;
}

.status-completed {
    background: #28a745;
    color: #fff;
}

.status-failed {
    background: #dc3545;
    color: #fff;
}

.status-active {
    background: #28a745;
    color: #fff;
}

.status-inactive {
    background: #6c757d;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #6c757d;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 内容预览 */
.content-preview {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.content-preview h3 {
    margin-bottom: 15px;
    color: #333;
}

.content-text {
    line-height: 1.8;
    color: #666;
    white-space: pre-wrap;
}

/* 快速操作 */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tabs a {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.filter-tabs a:hover,
.filter-tabs a.active {
    background: #007bff;
    color: #fff;
}

/* 文本工具类 */
.text-center {
    text-align: center;
}

.text-error {
    color: #dc3545;
}

/* 页脚 */
.footer {
    background: #fff;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    color: #666;
    border-top: 1px solid #eee;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

