/* =====================================================
   四川省项目数据查询系统 - 样式文件
   ===================================================== */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* 主容器 */
.main-container {
    display: flex;
    max-width: 2000px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
}

/* ==================== 左侧边栏 ==================== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
}

.table-count {
    font-size: 13px;
    opacity: 0.7;
}

/* 表导航 */
.table-nav {
    flex: 1;
    padding: 15px 10px;
    overflow-y: auto;
}

.table-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 15px;
    margin-bottom: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-size: 14px;
}

.table-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.table-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
}

.table-btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-right: 12px;
    font-size: 18px;
    flex-shrink: 0;
}

.table-btn.active .table-btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

.table-btn-text {
    flex: 1;
    line-height: 1.4;
}

.table-btn-count {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

/* 侧边栏统计 */
.sidebar-stats {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-stats .stat-item {
    text-align: center;
}

.sidebar-stats .stat-label {
    font-size: 12px;
    opacity: 0.7;
    display: block;
    margin-bottom: 5px;
}

.sidebar-stats .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

/* ==================== 右侧主内容 ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
}

.header h1 {
    font-size: 22px;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 13px;
    opacity: 0.9;
}

/* 当前表信息 */
.current-table-info {
    background: #f8f9fa;
    padding: 8px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-table-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 12px;
}

.current-table-name {
    color: #667eea;
    font-weight: 600;
    font-size: 12px;
}

/* 搜索面板包装器 - 固定定位 */
.search-panel-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

/* 搜索面板 */
.search-panel {
    padding: 12px 20px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

/* 年份选择器样式 - 固定宽度不伸缩 */
.form-row .year-group {
    flex: 0 0 110px !important;
    min-width: 110px;
    max-width: 110px;
}

.year-select {
    width: 100%;
}

/* 关键词输入框样式 - 占据剩余空间 */
.form-row .keyword-group {
    flex: 1 !important;
}

/* 字段筛选容器 */
.field-filters-container {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.field-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.field-filters-header label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.field-filters-tip {
    font-size: 11px;
    color: #6c757d;
}

.field-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.field-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.field-filter-item label {
    display: inline-block;
    min-width: 70px;
    font-size: 12px;
    color: #495057;
}

.field-filter-item input {
    flex: 1;
    font-size: 12px;
}

/* 搜索方式切换 */
.search-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.mode-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #f8f9fa;
}

.mode-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 搜索模式 */
.search-mode {
    display: none;
}

/* 日期范围输入框 */
.date-range-input {
    cursor: pointer;
    background-color: #fff;
}

/* 行内筛选容器 */
.inline-filters-row {
    align-items: flex-end;
    flex-wrap: wrap;
}

/* 行内表单组 */
.inline-form-group {
    flex: 0 0 auto;
    min-width: 140px;
    margin-bottom: 0 !important;
}

.inline-form-group label {
    margin-bottom: 4px;
    font-size: 11px;
}

/* 行内快捷日期按钮 */
.quick-date-buttons-inline {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    padding-bottom: 3px;
    margin: 0 8px;
}

.quick-date-btn {
    padding: 4px 8px;
    border: 1px solid #667eea;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #667eea;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-date-btn:hover {
    background: #667eea;
    color: white;
}

.quick-date-btn:active {
    transform: scale(0.95);
}

/* 快捷日期按钮 */
.quick-date-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-mode.active {
    display: block;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* 禁用按钮样式 */
.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 导出下拉菜单 */
.export-dropdown {
    position: relative;
    flex: 1;
}

#exportBtn {
    width: 100%;
    position: relative;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.export-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.export-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.export-dropdown.active .export-menu {
    display: block;
}

.export-menu-item {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: white;
    color: #333;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-menu-item:first-child {
    border-bottom: 1px solid #e9ecef;
}

.export-menu-item:hover {
    background: #f8f9fa;
}

.export-icon {
    font-size: 16px;
}

.btn-icon {
    font-size: 16px;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果面板 */
.results-panel {
    padding: 15px 20px;
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-shrink: 0;
    gap: 15px;
}

.results-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.column-filter-wrapper {
    position: relative;
}

.results-info {
    font-size: 13px;
    color: #6c757d;
    margin-left: auto;
}

/* 表格 */
.table-container {
    overflow: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 15px;
    background: white;
    max-height: 55vh;
    min-height: 400px;
}

.data-table {
    width: 100%;
    border-collapse: separate; /* 改为separate以支持sticky */
    border-spacing: 0;
    font-size: 12px;
    table-layout: fixed;
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 20; /* 提高z-index确保在最上层 */
}

/* 可排序列样式 */
.data-table th.sortable-column {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.data-table th.sortable-column:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* 排序激活状态 */
.data-table th.sorting-active {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* 排序图标 */
.data-table th .sort-icon {
    margin-left: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #212529;
    opacity: 1;
    transition: opacity 0.2s;
}

.data-table th.sorting-active .sort-icon {
    color: #0d6efd;
}

.data-table th .column-label {
    display: inline-block;
}

/* 列宽调整器 */
.column-resizer {
    position: absolute;
    right: -8px;
    top: 0;
    bottom: 0;
    width: 16px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    z-index: 1;
}

.column-resizer:hover,
.data-table th.resizing .column-resizer {
    background: rgba(102, 126, 234, 0.3);
}

.column-resizer:hover::after,
.data-table th.resizing .column-resizer::after {
    content: '';
    position: absolute;
    right: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #667eea;
}

.data-table th {
    /* 移除position: relative，避免覆盖sticky定位 */
    padding-right: 12px !important;
}

.data-table th.resizing {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    user-select: none;
    position: relative; /* 只在调整大小时应用relative */
}

.data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 列筛选按钮 */
.column-filter-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.column-filter-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.filter-icon {
    font-size: 14px;
}

.column-filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 1000;
    min-width: 280px;
    max-width: 400px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.filter-header h4 {
    font-size: 13px;
    color: #333;
    margin: 0;
}

.filter-tip {
    font-size: 11px;
    color: #e74c3c;
    background: #fde8e8;
    padding: 3px 8px;
    border-radius: 3px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-btn {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.column-checkboxes {
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
}

.column-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

.column-checkbox-item:hover {
    background: #f8f9fa;
}

.column-checkbox-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.column-checkbox-item label {
    font-size: 12px;
    color: #333;
    cursor: pointer;
    user-select: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 隐藏的列样式 */
.data-table th.hidden-column,
.data-table td.hidden-column {
    display: none;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    flex-shrink: 0;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.page-input {
    width: 50px;
    padding: 5px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
}

/* 空结果 */
.empty-result {
    text-align: center;
    padding: 60px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-result p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.empty-hint {
    font-size: 14px;
    color: #adb5bd;
}

/* 底部 */
.footer {
    background: #f8f9fa;
    padding: 12px 20px;
    text-align: center;
    font-size: 11px;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 响应式 */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        position: relative;
    }

    .table-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .table-btn {
        width: auto;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table td {
        padding: 8px 5px;
    }
}

/* ==================== 模态窗口 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.detail-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 140px;
    flex-shrink: 0;
    font-size: 14px;
}

.detail-value {
    color: #666;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.6;
}

.detail-value a {
    color: #667eea;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.detail-value.empty {
    color: #999;
    font-style: italic;
}

/* 模态窗口滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

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

/* =====================================================
   下载链接区域样式
   ===================================================== */
.download-link-area {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 20px auto;
    max-width: 600px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-link-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.download-icon {
    font-size: 20px;
}

.download-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.download-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.download-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.download-link-content {
    padding: 20px;
    text-align: center;
}

.download-link-content > p {
    margin-bottom: 16px;
    color: #495057;
    font-size: 14px;
}

.download-link-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.download-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.download-hint {
    margin-top: 12px !important;
    font-size: 13px !important;
    color: #6c757d !important;
}

.download-hint span {
    color: #28a745;
    font-weight: 500;
}

/* =====================================================
   多选下拉框样式
   ===================================================== */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-display {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: border-color 0.15s ease-in-out;
    font-size: 13px;
}

.multi-select-display:hover {
    border-color: #adb5bd;
}

.multi-select-display:focus,
.multi-select-container.active .multi-select-display {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    margin-top: 2px;
    max-height: 300px;
    overflow: hidden;
}

.multi-select-dropdown.active {
    display: block;
}

.multi-select-search {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
    outline: none;
}

.multi-select-search:focus {
    box-shadow: none;
}

.multi-select-search-container {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.multi-select-search-container .multi-select-search {
    border-bottom: none;
    flex: 1;
}

.multi-select-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s;
}

.multi-select-clear-btn:hover {
    background-color: #e9ecef;
    color: #666;
}

.multi-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.multi-select-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    flex-wrap: nowrap;
}

.multi-select-option:hover {
    background-color: #f8f9fa;
}

.multi-select-option.select-all-option {
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    background-color: #f8f9fa;
}

.multi-select-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.multi-select-option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    user-select: none;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 滚动条样式 */
.multi-select-options::-webkit-scrollbar {
    width: 8px;
}

.multi-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.multi-select-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}
