/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #409EFF;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #606266;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #409EFF;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #409EFF;
    color: white;
}

.btn-primary:hover {
    background: #66b1ff;
}

.btn-success {
    background: #67C23A;
    color: white;
}

.btn-success:hover {
    background: #85ce61;
}

.btn-danger {
    background: #F56C6C;
    color: white;
}

.btn-danger:hover {
    background: #f78989;
}

.btn-warning {
    background: #E6A23C;
    color: white;
}

.btn-warning:hover {
    background: #ebb563;
}

.btn-info {
    background: #909399;
    color: white;
}

.btn-info:hover {
    background: #a6a9ad;
}

.btn-secondary {
    background: #909399;
    color: white;
}

.btn-secondary:hover {
    background: #a6a9ad;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
}

.table th {
    background: #f5f7fa;
    font-weight: bold;
    color: #606266;
}

.table tr:hover {
    background: #f5f7fa;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-success {
    background: #f0f9ff;
    color: #67C23A;
}

.tag-warning {
    background: #fdf6ec;
    color: #E6A23C;
}

.tag-danger {
    background: #fef0f0;
    color: #F56C6C;
}

.tag-info {
    background: #f4f4f5;
    color: #909399;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination span {
    color: #606266;
}

/* 导航栏 */
.navbar {
    background: #409EFF;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 20px;
    font-weight: bold;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar-nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 40px;
    color: #909399;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px;
    color: #909399;
}

/* 动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}
