/* 天石海外仓分销平台 - 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}



/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    z-index: 1001;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 4px 10px;
    position: relative;
    overflow: hidden;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-menu a:hover::before {
    left: 100%;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 基础资料管理展开/折叠箭头动画 */
.sidebar-menu a[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-menu a[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* 子菜单样式优化 */
.sidebar-submenu {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 20px !important;
}

.sidebar-submenu a {
    padding-left: 20px !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
}

.sidebar-submenu a:hover {
    padding-left: 25px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* 主要内容区域 */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: all 0.3s ease;
    background-color: #f4f7fc;
}

/* 移除 hero-section 和 page-content 的旧样式 */
.hero-section, .page-content {
    padding: 0;
    background: none;
    color: inherit;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
    border-bottom: none;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 25px;
    background: rgba(255, 255, 255, 0.98);
}

/* 修复有背景色的卡片中card-body的样式 */
.card[class*="bg-"] .card-body {
    background: transparent !important;
    color: inherit;
}

/* 确保有背景色的卡片中的文字颜色正确 */
.card[class*="bg-"] .card-body h1,
.card[class*="bg-"] .card-body h2,
.card[class*="bg-"] .card-body h3,
.card[class*="bg-"] .card-body h4,
.card[class*="bg-"] .card-body h5,
.card[class*="bg-"] .card-body h6,
.card[class*="bg-"] .card-body p,
.card[class*="bg-"] .card-body span,
.card[class*="bg-"] .card-body div {
    color: inherit !important;
}

/* 特别处理警告色背景，确保文字颜色对比度 */
.card.bg-warning .card-body h1,
.card.bg-warning .card-body h2,
.card.bg-warning .card-body h3,
.card.bg-warning .card-body h4,
.card.bg-warning .card-body h5,
.card.bg-warning .card-body h6,
.card.bg-warning .card-body p,
.card.bg-warning .card-body span,
.card.bg-warning .card-body div {
    color: #212529 !important;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-1px);
}

/* 表格样式 */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 表单样式 */
.form-control,
.form-select {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* 输入组样式 */
.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    color: #6c757d;
}

.input-group .form-control {
    border-left: none;
}

/* 徽章样式 */
.badge {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
}

/* 分页样式 */
.pagination .page-link {
    border: none;
    color: #007bff;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
}

/* 确保导航栏内的container-fluid也使用渐变背景 */
.navbar .container-fluid {
    background: transparent !important;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* 加载动画 */
.spinner-border {
    color: #007bff;
}

/* 文本样式 */
.text-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 动画效果 */

/* 页面过渡效果 - 仅在点击导航时生效 */
body.page-transitioning {
    opacity: 0.95;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主内容区域过渡 - 仅在点击导航时生效 */
/* 主内容页面切换过渡效果 - 仅在用户点击导航时应用 */
.main-content.page-slide-out {
    transform: translateX(-20px);
    opacity: 0.8;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 现代化的页面加载器 */
.smooth-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-loader.show {
    opacity: 1;
    visibility: visible;
}

.loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    backdrop-filter: blur(8px);
}

.smooth-loader .loader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #495057;
    font-weight: 500;
}

/* 现代化加载动画 */
.modern-spinner {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: modernSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.4s;
    border-top-color: #2980b9;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.8s;
    border-top-color: #3498db;
    opacity: 0.6;
}

@keyframes modernSpin {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg);
        opacity: 1;
    }
}

.loader-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 旧版加载器兼容性 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
    color: #495057;
    font-weight: 500;
}

/* 导航链接加载状态 */
.sidebar-menu a.loading {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    pointer-events: none;
    position: relative;
}

.sidebar-menu a.loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}



/* 页面隐藏时的优化 */
body.page-hidden * {
    animation-play-state: paused !important;
}



/* 支持现代视图过渡API */
@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.3s;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    ::view-transition-old(root) {
        animation-name: slide-out;
    }
    
    ::view-transition-new(root) {
        animation-name: slide-in;
    }
}

@keyframes slide-out {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
}
/* 仅对交互元素应用过渡效果 */
.btn, .card, .sidebar-menu a, .dropdown-item, .table tbody tr {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* 统计卡片样式 */
.stats-card {
    border-radius: 12px;
    color: white;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.stats-card .stat-icon {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    font-size: 3.5rem;
    opacity: 0.15;
    transition: all 0.4s ease;
}

.stats-card:hover .stat-icon {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.25;
}

.stats-card h5 {
    font-weight: 300;
    font-size: 1rem;
}

.stats-card h2 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-top: 5px;
}

/* 为不同卡片设置颜色 */
.stats-card.bg-primary { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); }
.stats-card.bg-success { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.stats-card.bg-info { background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%); }
.stats-card.bg-warning { background: linear-gradient(135deg, #ffc107 0%, #d39e00 100%); }
.stats-card.bg-danger { background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%); }

/* 产品图片样式 */
.product-image {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* 用户头像样式 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* 活动时间线样式 */
.activity-timeline {
    position: relative;
    padding-left: 30px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.activity-item {
    position: relative;
    margin-bottom: 20px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007bff;
}

/* 响应式图片 */
.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: #2c3e50;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* 面包屑导航 */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

/* 筛选区域专业样式 */
.filter-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.filter-card .card-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-radius: 15px 15px 0 0 !important;
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-card .card-header h6 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.filter-card .card-body {
    padding: 30px;
    background: rgba(255, 255, 255, 0.98);
}

/* 表单标签样式 */
.filter-card .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.filter-card .form-label i {
    color: #6c757d;
}

/* 表单控件样式 */
.filter-card .form-control,
.filter-card .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
    background: rgba(255, 255, 255, 1);
}

.filter-card .form-control-lg,
.filter-card .form-select-lg {
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 12px;
}

/* 日期筛选区域 */
.date-filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.date-filter-section .form-label {
    color: #495057;
    font-size: 1.05rem;
}

/* 快速日期按钮样式 */
.quick-date-buttons {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-date-btn {
    border-radius: 25px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
    background: rgba(255, 255, 255, 0.9);
    color: #495057;
    white-space: nowrap;
    min-width: 80px;
}

/* flexbox gap替代了margin，确保按钮间距均匀 */
.quick-date-buttons .d-flex {
    gap: 8px;
}

.quick-date-btn:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.quick-date-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.quick-date-btn i {
    margin-right: 4px;
}

/* 按钮组样式 */
.btn-toolbar {
    gap: 8px;
}

.btn-group {
    border-radius: 25px;
    overflow: hidden;
}

/* 操作按钮样式 */
.filter-card .btn-lg {
    padding: 15px 35px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.filter-card .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.filter-card .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.filter-card .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
}

.filter-card .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-card .card-body {
        padding: 20px;
    }
    
    .date-filter-section {
        padding: 20px;
    }
    
    .quick-date-buttons {
        padding: 15px;
    }
    
    .quick-date-buttons .d-flex {
        gap: 6px;
    }
    
    .quick-date-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    .filter-card .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .filter-card .card-body {
        padding: 15px;
    }
    
    .date-filter-section {
        padding: 15px;
    }
    
    .quick-date-buttons {
        padding: 10px;
    }
    
    .quick-date-buttons .d-flex {
        gap: 4px;
    }
    
    .quick-date-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 60px;
        border-radius: 20px;
    }
}

/* 打印样式 */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
} 