/* 业务管理系统自定义样式 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏固定样式 */
.navbar.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.navbar.sticky-top.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 导航栏菜单高亮样式 */
.navbar .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    font-weight: 600;
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: bold;
    border-bottom: 2px solid rgba(0,0,0,.1);
}

/* 统计卡片 */
.bg-primary, .bg-success, .bg-info, .bg-warning {
    transition: transform 0.2s;
}

.bg-primary:hover, .bg-success:hover, .bg-info:hover, .bg-warning:hover {
    transform: translateY(-5px);
}

/* 排除导航栏的 bg-primary，避免悬停时跳动 */
.navbar.bg-primary:hover {
    transform: none;
}

/* 详情行样式 */
.detail-row {
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.detail-row .card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.detail-row .card-header {
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
}

.detail-row .btn-close {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.detail-row .btn-close:hover {
    opacity: 1;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
}

/* 徽章样式 */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 分页样式 */
.pagination .page-link {
    color: #0d6efd;
    border-radius: 0.375rem !important;
    margin: 0 2px;
    border: 1px solid #dee2e6 !important;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    font-weight: bold !important;
}

.pagination .page-item:not(.active) .page-link {
    background-color: white !important;
    color: #0d6efd !important;
}

/* 警告框样式 */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* 模态框样式 */
.modal-content {
    border-radius: 0.5rem;
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* 页脚样式 */
footer {
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 空状态提示 */
.text-muted {
    color: #6c757d !important;
}

/* 金额高亮 */
.fw-bold {
    font-weight: 600 !important;
}

/* 链接样式 */
a {
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: none;
}

/* 图标样式 */
.fas, .fab, .far {
    margin-right: 0.3rem;
}

/* 输入框组样式 */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 操作列按钮样式 */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.action-buttons .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.action-buttons .btn i {
    margin-right: 0;
    font-size: 14px;
}