/* Offer管理后台样式 */

:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --secondary-color: #858796;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #fff;
}

.sidebar .nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e3e6f0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
main {
    margin-top: 56px;
    padding: 2rem 0;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* 统计卡片 */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

.text-xs {
    font-size: 0.7rem;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: var(--dark-color) !important;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
}

.table td {
    color: var(--dark-color);
}

.table-hover tbody tr:hover {
    background-color: #f8f9fc;
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-group-vertical .btn {
    margin-bottom: 2px;
    border-radius: 0.375rem;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* 头像样式 */
.avatar-sm {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: 1px solid #e3e6f0;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: #f8f9fc;
    border-color: var(--primary-color);
}

/* 模态框样式 */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fc;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #d1d3e2;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    background-color: #f8f9fc;
    border: 1px solid #d1d3e2;
    border-radius: 0.375rem 0 0 0.375rem;
}

/* 进度条样式 */
.progress {
    border-radius: 0.375rem;
    background-color: #e3e6f0;
}

.progress-bar {
    border-radius: 0.375rem;
}

/* 警告框样式 */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

/* 标签页样式 */
.nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    border: none;
    color: var(--dark-color);
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* 列表组样式 */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    main {
        margin-top: 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 0.375rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
