/* 用户管理页面样式 - 若依风格 */

/* 减少整体边距 */
#big-container-right-content {
    margin: 8px !important;
}

.content_wraper {
    padding: 8px;
    background: #f0f2f5;
    min-height: auto;
}

/* 搜索表单区域 */
.search-bar {
    background: #fff;
    padding: 12px 15px;
    margin-bottom: 6px;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    min-height: auto;
}

/* 搜索栏隐藏时，移除上边框和阴影 */
.search-bar.search-bar-hidden {
    box-shadow: none;
    padding-top: 0;
    margin-bottom: 0;
}

.search-bar-content {
    margin-bottom: 10px;
    width: 100%;
    overflow: visible;
}

/* 横向搜索表单 */
.search-form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.search-form-inline .form-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.search-form-inline .form-label {
    font-weight: 500;
    color: #606266;
    font-size: 13px;
    white-space: nowrap;
    margin-bottom: 0;
    line-height: 1;
    width: auto;
    flex-shrink: 0;
    min-width: auto;
    margin-right: 0;
}

/* 输入框包装容器 */
.search-form-inline .input-wrapper {
    position: relative;
    display: inline-block;
    width: 160px;
}

.search-form-inline .input-wrapper .form-control {
    height: 28px;
    font-size: 13px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    width: 100%;
    padding: 0 24px 0 8px;
    box-sizing: border-box;
    min-width: 160px;
}

.search-form-inline .input-wrapper .form-select {
    height: 28px;
    font-size: 13px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    width: 100%;
    padding: 0 28px 0 8px;
    box-sizing: border-box;
    min-width: 160px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.search-form-inline .form-select {
    height: 28px;
    font-size: 13px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    width: 160px;
    padding: 0 8px;
    box-sizing: border-box;
    min-width: 160px;
}

/* 清除按钮 */
.search-form-inline .input-wrapper .clear-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #909399;
    font-size: 18px;
    font-weight: bold;
    z-index: 100;
    padding: 0;
    margin: 0;
    transition: color 0.3s;
    display: inline-block;
    line-height: 1;
    user-select: none;
    width: 16px;
    height: 16px;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
}

.search-form-inline .input-wrapper .clear-btn:hover {
    color: #606266;
}

.search-form-inline .input-wrapper .clear-btn:active {
    color: #303133;
}

.search-form-inline .form-select.placeholder-selected {
    color: #909399;
}

.search-form-inline .form-select.placeholder-selected option:not([value=""]) {
    color: #606266;
}

/* 状态下拉框占位符选项默认隐藏，但保留在select中作为占位符显示 */

.search-form-inline .form-control:focus,
.search-form-inline .form-select:focus {
    border-color: #409eff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.search-form-inline .form-buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    padding-bottom: 0;
}

.search-form-inline .form-buttons .btn {
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    margin-top: 0;
}

/* 日期范围选择器 */
.date-range-picker {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 280px;
    flex-shrink: 0;
}

.date-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 120px;
    max-width: 130px;
}

.date-input {
    width: 100%;
    height: 28px;
    font-size: 13px;
    padding: 0 24px 0 8px;
    box-sizing: border-box;
}

.date-input-wrapper .clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #909399;
    font-size: 18px;
    font-weight: bold;
    z-index: 100;
    padding: 0;
    margin: 0;
    transition: color 0.3s;
    display: inline-block;
    line-height: 1;
    user-select: none;
    width: 16px;
    height: 16px;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
}

.date-input-wrapper .clear-btn:hover {
    color: #606266;
}

.date-input-wrapper .clear-btn:active {
    color: #303133;
}

.date-separator {
    color: #909399;
    font-size: 13px;
    white-space: nowrap;
    padding: 0;
    flex-shrink: 0;
}

/* 操作按钮栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #ebeef5;
}

.toolbar-left {
    display: flex;
    gap: 8px;
}

.toolbar-left .btn {
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.toolbar-left .btn-primary {
    background: #409eff;
    color: #fff;
}

.toolbar-left .btn-primary:hover {
    background: #66b1ff;
}

.toolbar-left .btn-success {
    background: #67c23a;
    color: #fff;
}

.toolbar-left .btn-success:hover {
    background: #85ce61;
}

.toolbar-left .btn-danger {
    background: #f56c6c;
    color: #fff;
}

.toolbar-left .btn-danger:hover:not(:disabled) {
    background: #f78989;
}

.toolbar-left .btn-danger:disabled {
    background: #c0c4cc;
    cursor: not-allowed;
}

.toolbar-left .btn-info {
    background: #909399;
    color: #fff;
}

.toolbar-left .btn-info:hover {
    background: #a6a9ad;
}

.toolbar-left .btn-warning {
    background: #e6a23c;
    color: #fff;
}

.toolbar-left .btn-warning:hover {
    background: #ebb563;
}

.toolbar-right {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 13px;
}

.btn-icon:hover {
    color: #409eff;
    border-color: #409eff;
}

/* 数据表格区域 */
.content-list {
    background: #fff;
    padding: 12px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    min-height: 400px;
}

/* 表格响应式容器 - 允许下拉菜单溢出 */
.content-list .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    min-height: 400px;
    position: relative;
}

/* 确保表格单元格中的下拉菜单可以正常显示 */
.content-list .table td {
    position: relative;
    overflow: visible;
}

.table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead th {
    background-color: #fafafa;
    color: #606266;
    font-weight: 500;
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
    white-space: nowrap;
}

.table thead th:first-child {
    padding-left: 10px;
}

.table tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid #ebeef5;
    color: #606266;
}

.table tbody td:first-child {
    padding-left: 10px;
}

.table tbody tr {
    transition: background-color 0.25s ease;
}

.table tbody tr:hover {
    background-color: #f5f7fa;
}

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

/* 复选框样式 */
.table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #409eff;
}

/* 开关样式 */
.form-check.form-switch {
    display: inline-block;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.form-check.form-switch .form-check-input {
    width: 44px !important;
    height: 22px !important;
    cursor: pointer;
    border-radius: 11px !important;
    border: none !important;
    background-color: #dcdfe6 !important;
    transition: all 0.3s ease;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    margin: 0;
    padding: 0;
    background-image: none !important;
}

.form-check.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-check.form-switch .form-check-input:checked {
    background-color: #409eff !important;
    border-color: #409eff !important;
    background-image: none !important;
}

.form-check.form-switch .form-check-input:checked::before {
    left: 24px;
    background-color: #fff;
}

/* 操作按钮 */
.btn-link {
    padding: 0 3px;
    text-decoration: none;
    color: #409eff;
    font-size: 13px;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.btn-link:hover {
    color: #66b1ff;
}

.btn-link.text-primary {
    color: #409eff;
}

.btn-link.text-primary:hover {
    color: #66b1ff;
}

.btn-link.text-danger {
    color: #f56c6c;
}

.btn-link.text-danger:hover {
    color: #f78989;
}

.btn-link.text-info {
    color: #909399;
}

.btn-link.text-info:hover {
    color: #606266;
}

.separator {
    color: #dcdfe6;
    margin: 0 3px;
    font-size: 12px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.content-list .dropdown {
    z-index: 1051;
}

.dropdown-toggle::after {
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-bottom: 0;
    border-left: 4px solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: none;
    min-width: 120px;
    padding: 4px 0;
    margin: 2px 0 0;
    font-size: 14px;
    color: #606266;
    background-color: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #606266;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

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

.dropdown-item i {
    width: 14px;
    text-align: center;
    font-size: 14px;
    color: #909399;
}

/* 分页 */
.page-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 10px 0;
}

.page-info {
    color: #606266;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-size-select {
    width: auto;
    height: 32px;
    padding: 0 30px 0 10px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
}

.page-size-select:focus {
    border-color: #409eff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.pagination .btn {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .btn:hover:not(:disabled) {
    color: #409eff;
    border-color: #409eff;
}

.pagination .btn:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background: #f5f7fa;
}

.pagination .btn-primary {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
}

.pagination .btn-primary:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    font-size: 14px;
    color: #606266;
}

.page-jump .form-control {
    height: 32px;
    width: 50px;
    padding: 0 8px;
    text-align: center;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.page-jump .form-control:focus {
    border-color: #409eff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 模态框样式 */
.modal-content {
    border-radius: 4px;
    border: none;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ebeef5;
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    color: #303133;
}

.modal-body {
    padding: 20px 24px;
}

/* 只对用户编辑对话框设置最小高度 */
#userModal .modal-body {
    min-height: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-body .form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #606266;
    font-size: 14px;
}

.modal-body .form-control,
.modal-body .form-select {
    height: 36px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    padding: 6px 11px;
    line-height: 1.5;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #409eff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.modal-body textarea.form-control {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ebeef5;
}

.modal-footer .btn {
    height: 32px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-footer .btn-secondary {
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
}

.modal-footer .btn-secondary:hover {
    color: #409eff;
    border-color: #409eff;
}

.modal-footer .btn-primary {
    background: #409eff;
    color: #fff;
}

.modal-footer .btn-primary:hover {
    background: #66b1ff;
}

/* 加载状态 */
.spinner-border {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* 空数据提示 */
.text-muted {
    color: #909399;
    font-size: 14px;
}

/* 必填项标记 */
.text-danger {
    color: #f56c6c !important;
}

/* 模态框表单样式 - 标签和输入框同一行 */
#userModal .form-item-inline {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* 嵌套在左列内的row，确保邮箱和性别能并排显示 */
#userModal .col-md-6 .row {
    margin-left: 0;
    margin-right: 0;
}

#userModal .col-md-6 .row > .col-md-6 {
    padding-left: 8px;
    padding-right: 8px;
}

#userModal .form-item-inline .form-label {
    width: 100px;
    flex-shrink: 0;
    margin-bottom: 0;
    margin-right: 12px;
    text-align: right;
    font-size: 14px;
    color: #606266;
    font-weight: normal;
    white-space: nowrap;
}

#userModal .form-item-inline .form-control,
#userModal .form-item-inline .form-select {
    flex: 1;
    min-width: 0;
    height: 36px;
    font-size: 14px;
    padding: 6px 11px;
    line-height: 1.5;
}

/* 模态框中的input-wrapper */
#userModal .form-item-inline .input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

#userModal .form-item-inline .input-wrapper .form-control {
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

#userModal .form-item-inline .input-wrapper .form-select {
    flex: 1;
    min-width: 0;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

#userModal .form-item-inline .input-wrapper textarea.form-control {
    padding-right: 28px;
    resize: vertical;
    min-height: 60px;
}

/* 模态框中的清除按钮 */
#userModal .form-item-inline .input-wrapper .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #909399;
    font-size: 18px;
    font-weight: bold;
    z-index: 100;
    padding: 0;
    margin: 0;
    transition: color 0.3s;
    display: inline-block;
    line-height: 1;
    user-select: none;
    width: 16px;
    height: 16px;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
    pointer-events: auto;
}

/* 下拉框的清除按钮位置需要调整，避免与箭头重叠 */
#userModal .form-item-inline .input-wrapper .form-select + .clear-btn {
    right: 24px;
}

/* 自定义部门下拉框的清除按钮位置调整，避免与箭头重叠 */
#userModal .form-item-inline .input-wrapper .custom-dept-select + .clear-btn {
    right: 28px;
}

/* textarea的清除按钮位置调整，放在右上角 */
#userModal .form-item-inline .input-wrapper textarea.form-control + .clear-btn {
    top: 8px;
    right: 8px;
    transform: none;
}

#userModal .form-item-inline .input-wrapper .clear-btn:hover {
    color: #606266;
}

#userModal .form-item-inline .input-wrapper .clear-btn:active {
    color: #303133;
}

/* 归属部门下拉框：占位符选项在下拉列表中隐藏 */
#userModal .dept-select option[value=""] {
    display: none;
}

/* 当没有选中值时，显示占位符文本 */
#userModal .dept-select:invalid {
    color: #909399;
}

/* 用户性别下拉框：占位符选项在下拉列表中隐藏 */
#userModal .sex-select option[value=""] {
    display: none;
}

/* 当没有选中值时，显示占位符文本 */
#userModal .sex-select:invalid {
    color: #909399;
}

#userModal .post-select option[value=""] {
    display: none;
}

#userModal .post-select:invalid {
    color: #909399;
}

#userModal .role-select option[value=""] {
    display: none;
}

#userModal .role-select:invalid {
    color: #909399;
}

#userModal .sex-select option:not([value=""]) {
    color: #606266;
}

#userModal .form-item-inline textarea.form-control {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

#userModal .form-item-inline .form-check-inline {
    margin-left: 0;
    margin-right: 16px;
    display: inline-flex;
    align-items: center;
}

#userModal .form-item-inline .form-check-label {
    margin-left: 4px;
    font-weight: normal;
    margin-bottom: 0;
    font-size: 13px;
}

/* 提示信息模态框始终显示在最上层 */
#apiMessageModal {
    z-index: 1090 !important;
}

#apiMessageModal + .modal-backdrop,
.modal-backdrop.show ~ #apiMessageModal {
    z-index: 1090 !important;
}

#apiMessageModal.show {
    z-index: 1090 !important;
}

/* 自定义部门树形下拉选择器 */
.custom-dept-select {
    position: relative;
    width: 100%;
}

.dept-select-display {
    position: relative;
    width: 100%;
    height: 36px;
    padding: 6px 50px 6px 11px;
    line-height: 24px;
    background-color: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
    font-size: 13px;
}

.dept-select-display:hover {
    border-color: #c0c4cc;
}

.custom-dept-select.is-open .dept-select-display {
    border-color: #409eff;
}

.dept-selected-text {
    color: #606266;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dept-placeholder {
    color: #999;
    flex: 1;
}

.dept-arrow {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #909399;
    transition: transform 0.3s;
    font-style: normal;
    z-index: 1;
}

.dept-arrow.is-open {
    transform: translateY(-50%) rotate(180deg);
}

.dept-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.dept-tree-container {
    padding: 4px 0;
}

.dept-tree-item {
    position: relative;
}

.dept-tree-node {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 32px;
}

.dept-tree-node:hover {
    background-color: #f5f7fa;
}

.dept-toggle-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    margin-right: 4px;
    font-size: 10px;
    color: #909399;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.dept-toggle-icon.is-expanded {
    transform: rotate(90deg);
}

.dept-toggle-placeholder {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
}

.dept-name {
    flex: 1;
    color: #606266;
    user-select: none;
    font-size: 13px;
}

.dept-name.is-selected {
    color: #409eff;
    font-weight: 500;
}

.dept-children {
    background-color: #fafafa;
}

/* 用户管理左右分栏布局 */
.user-management-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.user-management-left {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    overflow: hidden;
}

.user-management-right {
    flex: 1;
    min-width: 0;
}

/* 部门树面板 */
.dept-tree-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.dept-tree-header {
    padding: 12px;
    border-bottom: 1px solid #e4e7ed;
    background: #fff;
}

.dept-search-wrapper {
    position: relative;
}

.dept-search-input {
    width: 100%;
    height: 32px;
    padding: 0 30px 0 10px;
    font-size: 13px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.dept-search-input:focus {
    outline: none;
    border-color: #409eff;
}

.dept-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #909399;
    font-size: 14px;
    pointer-events: none;
}

.dept-tree-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.dept-tree-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #909399;
}

.dept-tree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #909399;
}

.dept-tree-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.dept-tree-empty p {
    margin: 0;
    font-size: 14px;
}

.dept-tree-list {
    padding: 0;
}

.dept-tree-item {
    margin: 0;
}

.dept-tree-node {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
    min-height: 36px;
}

.dept-tree-node:hover {
    background-color: #f5f7fa;
}

.dept-tree-node.selected {
    background-color: #ecf5ff;
    color: #409eff;
}

.dept-tree-node.selected .dept-name {
    color: #409eff;
    font-weight: 500;
}

.dept-folder-icon {
    margin-right: 6px;
    font-size: 14px;
    color: #909399;
    flex-shrink: 0;
}

.dept-tree-node.selected .dept-folder-icon {
    color: #409eff;
}

/* 自定义滚动条样式 */
.dept-tree-content::-webkit-scrollbar {
    width: 6px;
}

.dept-tree-content::-webkit-scrollbar-track {
    background: transparent;
}

.dept-tree-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dept-tree-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dept-tree-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* ========== 响应式设计 ========== */

/* 中等屏幕（平板，768px - 1200px） */
@media (max-width: 1200px) {
    .user-management-wrapper {
        flex-direction: column;
    }
    
    .user-management-left {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .dept-tree-panel {
        height: auto;
        min-height: 300px;
        max-height: 400px;
    }
    
    /* 搜索表单在小屏幕上允许换行 */
    .search-form-inline {
        flex-wrap: wrap;
    }
    
    .search-form-inline .form-item {
        flex: 1 1 auto;
        min-width: 200px;
    }
    
    .date-range-picker {
        width: 100%;
        min-width: 280px;
    }
    
    /* 操作按钮可以换行 */
    .toolbar-left {
        flex-wrap: wrap;
    }
    
    .toolbar-left .btn {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* 小屏幕（手机，小于768px） */
@media (max-width: 768px) {
    .user-management-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-management-left {
        width: 100%;
        order: 2; /* 部门树移到下面 */
    }
    
    .user-management-right {
        order: 1; /* 用户列表移到上面 */
    }
    
    .dept-tree-panel {
        height: auto;
        min-height: 200px;
        max-height: 300px;
    }
    
    /* 搜索表单垂直排列 */
    .search-form-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-form-inline .form-item {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        min-width: 0;
    }
    
    .search-form-inline .form-label {
        margin-bottom: 6px;
        width: auto;
    }
    
    .search-form-inline .input-wrapper {
        width: 100%;
    }
    
    .search-form-inline .input-wrapper .form-control,
    .search-form-inline .input-wrapper .form-select {
        min-width: 0;
        width: 100%;
    }
    
    .date-range-picker {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .date-input-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .date-separator {
        display: none;
    }
    
    .search-form-inline .form-buttons {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        justify-content: flex-start;
    }
    
    .search-form-inline .form-buttons .btn {
        flex: 1;
        min-width: 0;
    }
    
    /* 操作按钮栏垂直排列 */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .toolbar-left {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .toolbar-left .btn {
        flex: 1 1 auto;
        min-width: 80px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* 表格横向滚动 */
    .content-list .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 800px; /* 确保表格最小宽度 */
    }
    
    /* 表格字体稍小 */
    .table {
        font-size: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 6px 4px;
    }
    
    /* 操作列按钮紧凑 */
    .table tbody td:last-child {
        white-space: nowrap;
    }
    
    .btn-link {
        font-size: 12px;
        padding: 0 2px;
    }
    
    .separator {
        margin: 0 2px;
    }
    
    /* 分页栏垂直排列 */
    .page-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .page-info {
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    .page-jump {
        margin-left: 0;
        margin-top: 8px;
        justify-content: center;
        width: 100%;
    }
}

/* 超小屏幕（小于576px） */
@media (max-width: 576px) {
    .content_wraper {
        padding: 4px;
    }
    
    .search-bar {
        padding: 10px 12px;
    }
    
    .content-list {
        padding: 10px 12px;
    }
    
    .toolbar-left .btn {
        font-size: 11px;
        padding: 0 6px;
    }
    
    .toolbar-left .btn i {
        font-size: 11px;
    }
    
    /* 表格更紧凑 */
    .table {
        font-size: 11px;
        min-width: 700px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 4px 2px;
    }
    
    /* 操作按钮更紧凑 */
    .btn-link {
        font-size: 11px;
    }
    
    .btn-link i {
        font-size: 10px;
    }
    
    /* 分页按钮更小 */
    .pagination .btn {
        height: 28px;
        min-width: 28px;
        padding: 0 6px;
        font-size: 12px;
    }
    
    .page-size-select {
        height: 28px;
        font-size: 12px;
    }
}

/* 确保表格在小屏幕上可以横向滚动 */
@media (max-width: 1200px) {
    .content-list .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* 添加滚动提示 */
    .content-list .table-responsive::after {
        content: '← 左右滑动查看更多 →';
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        color: #909399;
        white-space: nowrap;
        pointer-events: none;
    }
}

/* 隐藏滚动提示（当屏幕足够大时） */
@media (min-width: 1201px) {
    .content-list .table-responsive::after {
        display: none;
    }
}
