/* 自定义样式文件 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f0f2f5;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

/* 时间选择按钮样式 */
#btn-today,
#btn-yesterday,
#btn-week,
#btn-more {
    background-color: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

#btn-today:hover,
#btn-yesterday:hover,
#btn-week:hover,
#btn-more:hover {
    background-color: #409eff;
    color: #fff;
    border-color: #409eff;
}

#btn-month {
    background-color: #409eff;
    color: #fff;
    border: 1px solid #409eff;
}

#btn-month:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

.btn-primary {
    background-color: #409eff;
    color: white;
}

.btn-primary:hover {
    background-color: #66b1ff;
}

.btn-success {
    background-color: #67c23a;
    color: white;
}

.btn-success:hover {
    background-color: #85ce61;
}

.btn-warning {
    background-color: #e6a23c;
    color: white;
}

.btn-warning:hover {
    background-color: #ebb563;
}

.btn-danger {
    background-color: #f56c6c;
    color: white;
}

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

.btn-disabled {
    background-color: #c0c4cc;
    color: white;
    cursor: not-allowed;
}

/* 输入框样式 */
.input {
    width: 100%;
    height: 36px;
    padding: 0 15px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

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

.form-label {
    display: inline-block;
    width: 100px;
    text-align: right;
    padding-right: 15px;
    color: #606266;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-input {
    display: inline-block;
    width: calc(100% - 115px);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

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

.table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
}

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

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

.pagination-item {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-item:hover {
    border-color: #409eff;
    color: #409eff;
}

.pagination-item.active {
    background-color: #409eff;
    color: white;
    border-color: #409eff;
}

/* 对话框样式 */
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-content {
    background-color: white;
    border-radius: 4px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.dialog-header {
    padding: 20px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-title {
    font-size: 16px;
    font-weight: bold;
    color: #303133;
    margin: 0;
}

.dialog-close {
    font-size: 20px;
    color: #909399;
    cursor: pointer;
    transition: all 0.3s;
}

.dialog-close:hover {
    color: #606266;
}

.dialog-body {
    padding: 20px;
}

.dialog-footer {
    padding: 20px;
    border-top: 1px solid #ebeef5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background-color: #67c23a;
}

.message-error {
    background-color: #f56c6c;
}

.message-warning {
    background-color: #e6a23c;
}

.message-info {
    background-color: #909399;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #409eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-item {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    background-color: white;
    color: #606266;
    height: 32px;
    line-height: 18px;
    box-sizing: border-box;
}

.pagination-item:hover {
    border-color: #409eff;
    color: #409eff;
}

.pagination-item.active {
    background-color: #409eff;
    color: white;
    border-color: #409eff;
}

.pagination-item:first-child,
.pagination-item:last-child {
    min-width: 80px;
    text-align: center;
}

/* 分页控制区域 */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #606266;
}

.page-size-selector select {
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    min-width: 60px;
    height: 32px;
    box-sizing: border-box;
}

/* 状态标签样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.badge-success {
    background-color: #52c41a;
    color: #fff;
}

.badge-danger {
    background-color: #ff4d4f;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-label {
        width: 80px;
    }
    
    .form-input {
        width: calc(100% - 95px);
    }
    
    .dialog-content {
        width: 90%;
    }
    
    .pagination-controls {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
}
