/* 岗位管理样式 - 模仿角色管理 */

/* 减少整体边距 */
#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-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap; /* 不换行 */
}

.search-item {
    display: flex;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0; /* 防止收缩 */
}

.search-item .form-label {
    margin-bottom: 0;
    margin-right: 8px; /* 减小右边距 */
    font-weight: normal;
    color: #606266;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
}

/* 输入框和下拉框包装器 */
.search-item .input-wrapper,
.search-item .select-wrapper {
    position: relative;
    display: inline-block;
}

.search-item .input-wrapper .form-control {
    width: 140px; /* 减小宽度 */
    height: 32px;
    padding: 0 30px 0 10px; /* 右侧留出清除按钮空间 */
    font-size: 13px;
}

.search-item .select-wrapper .form-select {
    width: 140px; /* 减小宽度 */
    height: 32px;
    padding: 0 50px 0 10px; /* 右侧留出清除按钮和下拉箭头空间 */
    font-size: 13px;
}

/* 占位符文本样式 */
.search-item .form-select.placeholder-text {
    color: #999;
}

.search-item .form-select.placeholder-text option:not([disabled]) {
    color: #333;
}

/* 清除按钮样式 */
.search-item .clear-input {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 12px;
    z-index: 10;
    padding: 4px;
    transition: color 0.2s;
}

.search-item .clear-select {
    position: absolute;
    right: 28px; /* 放在下拉箭头左侧 */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 12px;
    z-index: 10;
    padding: 4px;
    transition: color 0.2s;
}

.search-item .clear-input:hover,
.search-item .clear-select:hover {
    color: #333;
}

.search-item-date {
    flex-shrink: 0; /* 防止收缩 */
}

.search-item-date .date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-item-date .date-input-wrapper {
    position: relative;
    display: inline-block;
}

.search-item-date .date-input-wrapper .form-control {
    width: 150px; /* 增加宽度 */
    height: 32px;
    padding: 0 30px 0 10px; /* 右侧留出清除按钮空间 */
    font-size: 13px;
}

/* 日期清除按钮样式 */
.search-item-date .clear-date {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 12px;
    z-index: 10;
    padding: 4px;
    transition: color 0.2s;
}

.search-item-date .clear-date:hover {
    color: #333;
}
 
.date-separator {
    color: #606266;
    margin: 0 4px;
}
 
.search-buttons {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    flex-shrink: 0; /* 防止按钮区域收缩 */
}
 
.search-buttons .btn {
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}
 
/* 操作按钮栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #ebeef5;
    margin-bottom: 0;
    background: transparent;
    padding-bottom: 0;
}

.toolbar-left {
    display: flex;
    gap: 8px;
}

.toolbar-right {
    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-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;
}
 
.text-primary { color: #409eff !important; }
.text-success { color: #67c23a !important; }
.text-danger { color: #f56c6c !important; }
.text-info { color: #909399 !important; }

/* 下拉菜单样式 */
.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;
}
 
/* 模态框样式调整 */
.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e8eaec;
    background: #fff;
}
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e8eaec;
    background: #fff;
    display: flex;
    justify-content: center; /* 按钮居中 */
    gap: 15px;
}
.modal-body {
    padding: 30px 40px; /* 增加内边距 */
}
 
/* 表单行样式（水平布局） */
.form-row-item {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}

.form-row-item .form-label {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 15px;
    margin-bottom: 0;
    flex-shrink: 0;
    color: #606266;
    font-weight: 500;
}

.form-row-item .form-content {
    flex: 1;
    position: relative;
}

.form-row-item .form-control {
    height: 36px;
    border-radius: 4px;
}

.form-row-item textarea.form-control {
    height: auto;
}

/* 必填红星 */
.required-star {
    color: #f56c6c;
    margin-right: 4px;
}

/* 数字输入框（Spinner） */
.input-number-wrapper {
    position: relative;
    width: 180px; /* 限制宽度 */
}

/* 单选按钮样式优化 */
.radio-group {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 36px;
}

.custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.custom-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #dcdfe6;
    border-radius: 50%;
    margin-right: 8px;
    outline: none;
    position: relative;
    transition: all 0.3s;
}

.custom-radio input[type="radio"]:checked {
    border-color: #409eff;
    background-color: #fff;
}

.custom-radio input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #409eff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-radio input[type="radio"]:hover {
    border-color: #409eff;
}

/* 按钮样式覆盖 */
.modal-footer .btn {
    min-width: 80px;
    height: 36px;
}

.btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-outline-secondary {
    color: #606266;
    border-color: #dcdfe6;
    background-color: #fff;
}

.btn-outline-secondary:hover {
    color: #1890ff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}

/* 响应式 */
@media (max-width: 768px) {
    .search-item, .search-item-date, .search-buttons {
        width: 100%;
        margin-right: 0;
    }
    .search-item .form-control, .search-item .form-select {
        width: 100%;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .toolbar-left, .toolbar-right {
        justify-content: space-between;
    }
    .page-bar {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
    .page-info {
        margin-right: 0;
        align-self: flex-start;
    }
    
    .form-row-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row-item .form-label {
        text-align: left;
        margin-bottom: 8px;
        width: 100%;
        justify-content: flex-start;
    }
}

