/* SharpBlade - 全局样式 */

* {
    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;
    line-height: 1.5;
    color: #333;
    background: #f0f2f5;
}

a {
    text-decoration: none;
    color: #1890ff;
}

a:hover {
    color: #40a9ff;
}

/* 布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
}

.header-inner {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.logo span {
    color: #ff0050;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #333;
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #ff0050;
    border-bottom-color: #ff0050;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info a {
    color: #666;
    font-size: 14px;
}

.user-info a:hover {
    color: #ff0050;
}

/* 侧边栏 */
.layout {
    display: flex;
    min-height: 100vh;
    padding-top: 64px;
}

.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-menu {
    padding: 16px 0;
}

.sidebar-menu .menu-title {
    padding: 8px 24px;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 24px;
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #fff0f3;
    color: #ff0050;
    border-left-color: #ff0050;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 16px;
    display: inline-block;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 24px;
    min-height: calc(100vh - 64px);
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.page-header p {
    color: #666;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.card-body {
    padding: 24px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    gap: 6px;
}

.btn-primary {
    background: #ff0050;
    color: #fff;
}

.btn-primary:hover {
    background: #e60049;
    color: #fff;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background: #389e0d;
    color: #fff;
}

.btn-warning {
    background: #faad14;
    color: #fff;
}

.btn-warning:hover {
    background: #d48806;
    color: #fff;
}

.btn-danger {
    background: #f5222d;
    color: #fff;
}

.btn-danger:hover {
    background: #cf1322;
    color: #fff;
}

.btn-default {
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
}

.btn-default:hover {
    border-color: #ff0050;
    color: #ff0050;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-label .required {
    color: #f5222d;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #ff0050;
    box-shadow: 0 0 0 3px rgba(255,0,80,0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
    font-size: 13px;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table .actions a {
    font-size: 13px;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.page-info {
    color: #666;
    font-size: 13px;
}

.page-btns {
    display: flex;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #d9d9d9;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: #ff0050;
    color: #ff0050;
}

.page-btn.active {
    background: #ff0050;
    color: #fff;
    border-color: #ff0050;
}

.page-btn.disabled {
    color: #bbb;
    cursor: not-allowed;
    background: #f5f5f5;
}

.page-btn.dots {
    border: none;
    cursor: default;
}

.page-jump {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-jump input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.page-jump button {
    padding: 6px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.page-jump button:hover {
    border-color: #ff0050;
    color: #ff0050;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: #ff0050;
    border-radius: 4px;
    transition: width 0.3s;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    color: #666;
    font-size: 14px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card.primary .stat-icon { background: #fff0f3; color: #ff0050; }
.stat-card.success .stat-icon { background: #f6ffed; color: #52c41a; }
.stat-card.warning .stat-icon { background: #fffbe6; color: #faad14; }
.stat-card.danger .stat-icon { background: #fff1f0; color: #f5222d; }

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-box .logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-box .logo h2 {
    font-size: 24px;
    color: #333;
}

.login-box .logo p {
    color: #999;
    margin-top: 8px;
}

/* 消息提示 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.alert-error {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #cf1322;
}

.alert-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d48806;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .site-footer {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 搜索筛选 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-control {
    width: auto;
    min-width: 180px;
}

/* 日志输出 */
.log-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 6px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 页脚 */
.site-footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 20px 24px;
    margin-top: auto;
    margin-left: 220px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.site-footer a {
    color: #666;
    margin: 0 8px;
}

.site-footer a:hover {
    color: #ff0050;
}

.site-footer .footer-divider {
    color: #ddd;
    margin: 0 4px;
}

/* 登录页页脚 */
.login-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.login-footer a {
    color: rgba(255,255,255,0.8);
    margin: 0 8px;
}

.login-footer a:hover {
    color: #fff;
}

.login-page {
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px;
}
