/* style.css */
/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* 容器样式 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header h1 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    font-size: 22px;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.admin-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 5px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 12px;
}

.btn-primary {
    background-color: #2ecc71;
    color: white;
}

.btn-primary:hover {
    background-color: #27ae60;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 4px 8px;
}

.btn-outline:hover {
    background-color: #3498db;
    color: white;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 4px 8px;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-group {
    display: inline-flex;
    gap: 4px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: #2c3e50;
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border 0.2s;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #3498db;
    outline: none;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 15px;
    font-size: 13px;
}

.table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid #ddd;
    text-align: left;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.table tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 操作列 */
.actions-col {
    width: 110px;
    white-space: nowrap;
}

/* 链接样式 */
.question-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 13px;
}

.question-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.never-updated {
    color: #95a5a6;
    font-style: italic;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.page-info {
    margin: 0 12px;
    color: #7f8c8d;
    font-size: 13px;
}

/* 空状态 */
.empty-message {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

/* 错误提示 */
.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 13px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 元信息网格 */
.meta-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 10px; 
    margin: 15px 0;
}

.meta-item { 
    display: flex; 
    font-size: 13px;
}

.label { 
    font-weight: bold; 
    min-width: 70px; 
    color: #7f8c8d;
}

/* 内容区域 */
.content {
    margin: 20px 0;
    white-space: pre-line;
    line-height: 1.7;
    font-size: 14px;
}

/* 工具按钮组 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-btn:hover {
    background: #2980b9;
}

/* 用户管理表格 */
.user-table {
    width: 100%;
}

.user-table th {
    background-color: #f8f9fa;
}

.user-status-active {
    color: #2ecc71;
}

.user-status-inactive {
    color: #e74c3c;
}

/* 添加以下样式 */
.log-status-success {
    color: #2ecc71;
    font-weight: 500;
}
.log-status-fail {
    color: #e74c3c;
    font-weight: 500;
}
.user-agent {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.log-details {
    font-size: 12px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .table th, 
    .table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
    
    .actions-col {
        width: 90px;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
    }
}