/* 视觉优化增强样式表 - 紫色渐变毛玻璃主题 */

/* 全局背景图片 - 使用 R-C.jpg */
body {
    position: relative;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 背景图片层 - 确保在最底层 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/R-C.jpg') center center / cover no-repeat;
    z-index: -10;
}

/* 全局背景覆盖层 - 浅色遮罩（让背景图更清晰） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    z-index: -9;
}

/* 主内容区域 - 适配左侧边栏 */
.main-content-wrapper {
    margin-left: 0;
    padding: 1.5rem;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
    .main-content-wrapper {
        margin-left: 240px;
        padding: 2rem 2.5rem;
    }
}

@media (max-width: 1023.98px) {
    .main-content-wrapper {
        margin-left: 0;
        padding-top: 80px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 容器宽度限制 */
.container-fluid {
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (min-width: 1024px) {
    .container-fluid {
        max-width: 1400px;
    }
}

/* 文本阴影效果 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 毛玻璃卡片样式 */
.card {
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    color: white;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
}

/* 卡片头部 */
.card-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    padding: 1.2rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* 紫色渐变背景 */
.bg-gradient-purple {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
}

/* 半透明背景 - 毛玻璃效果 */
.bg-opacity-95 {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.bg-opacity-90 {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 表单输入框 - 毛玻璃效果 */
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    outline: none;
    color: white;
}

/* 表单标签 */
.form-label,
label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* 毛玻璃按钮 */
.btn,
button[type="submit"],
button {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn:hover,
button[type="submit"]:hover,
button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
    color: white;
}

.btn:active,
button[type="submit"]:active,
button:active {
    transform: translateY(0);
}

/* 主要操作按钮 */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
}

/* 危险按钮 */
.btn-danger {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.4);
}

.btn-danger:hover {
    background: rgba(220, 53, 69, 0.45);
    border-color: rgba(220, 53, 69, 0.6);
}

/* 表格样式 */
.table {
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 100%;
}

.table thead th {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table tbody tr {
    transition: background 0.2s ease;
}

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

/* 表格容器 */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

/* DataTables 样式 */
.dataTables_wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5);
}

/* DataTables 错误提示 - 毛玻璃效果 */
.dataTables_wrapper .dataTables_processing,
.dataTables_processing {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
    padding: 1rem 2rem !important;
}

/* 覆盖原生 DataTables 错误对话框 */
.swal2-container .swal2-popup {
    background: rgba(30, 20, 60, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    color: white !important;
}

.swal2-container .swal2-title {
    color: white !important;
}

.swal2-container .swal2-html-container {
    color: rgba(255, 255, 255, 0.9) !important;
}

.swal2-container .swal2-confirm {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 8px !important;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* 导航链接样式 */
.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 卡片统计样式 */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50% 0 0 50%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
}

/* 文字颜色优化 */
.text-white-custom {
    color: rgba(255, 255, 255, 0.9) !important;
}

.text-muted-custom {
    color: rgba(255, 255, 255, 0.6) !important;
}