/* 商务管理后台样式 - 现代化设计 */

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

html {
    overflow-y: scroll; /* 始终显示垂直滚动条，避免滚动条出现/消失导致的页面跳动 */
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部导航栏 */
.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1030; /* 确保导航栏在上层 */
}

.sys-navbar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.sys-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin: 0 0.125rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sys-navbar .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.sys-navbar .navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sys-navbar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.sys-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 下拉菜单 */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
    padding: 0.5rem;
    margin-top: 0.5rem !important;
    position: absolute;
    z-index: 1050; /* 确保下拉菜单在最上层，高于导航栏 */
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: #374151;
    font-weight: 500;
    border-radius: 0.5rem;
    margin: 0.125rem 0;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #1f2937;
    transform: translateX(4px);
}

.dropdown-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 0.5rem 0;
}

/* 主容器 */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #64748b;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #475569;
    font-weight: 600;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-header h5,
.card-header h6 {
    color: #1e293b;
    font-weight: 700;
    margin: 0;
    font-size: 1.25rem;
}

.card-body {
    padding: 2rem;
}

/* 统计卡片特殊样式 */
.border-left-primary {
    border-left: 4px solid #3b82f6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.border-left-success {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.border-left-warning {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

/* 统计卡片内部样式 */
.text-xs {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.h5 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.text-gray-800 {
    color: #1e293b !important;
}

.text-primary {
    color: #3b82f6 !important;
}

.text-success {
    color: #10b981 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* 表单控件 */
.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

.input-group {
    border-radius: 0.75rem;
    overflow: hidden;
}

.input-group-text {
    background: rgba(241, 245, 249, 0.9);
    border: 2px solid #e2e8f0;
    border-right: none;
    color: #64748b;
    font-weight: 600;
    padding: 0.875rem 1rem;
}

/* 按钮样式 */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* 警告框样式 */
.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1.5rem;
    margin-bottom: 0;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.alert-info h6 {
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.alert-info p {
    margin-bottom: 0;
    font-weight: 500;
}

/* 标签样式 */
label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 辅助类 */
.font-weight-bold {
    font-weight: 700 !important;
}

.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.border-0 {
    border: none !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.d-none {
    display: none !important;
}

.d-lg-inline {
    display: inline !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .sys-navbar .navbar-nav .nav-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .h5 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .form-control {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .row > .col-md-5,
    .row > .col-md-7,
    .row > .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .h5 {
        font-size: 1.25rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* 特殊效果 */
.font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
}

/* 表格样式 */
.table {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
    border: none;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #374151;
}

.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.02);
}

.table-responsive {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.bg-light {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: #374151 !important;
}

/* 表单选择器 */
.form-select {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

/* 小按钮样式 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.btn-outline-danger {
    border: 2px solid #ef4444;
    color: #ef4444;
    background: transparent;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.6s ease-out;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-page .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.login-page .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

.login-page .btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.login-page .alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.login-page .alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}

.login-page .text-center a {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-page .text-center a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.pagination .page-link {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    margin: 0 0.0625rem;
    padding: 0.4rem 0.625rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* 响应式登录页面 */
@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

/* 分页响应式优化 */
@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.875rem;
    }
    
    .pagination {
        justify-content: center !important;
    }
}