* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  color: #333;
  background-color: #f0f2f5;
}

/* 顶部导航栏 */
.top-header {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 24px;
  height: 24px;
  background: #1890ff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

.system-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.header-icon {
  width: 16px;
  height: 16px;
  color: #8c8c8c;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.user-info:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1890FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

#userName {
  font-size: 14px;
  color: #333;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 16px;
  margin-top: 8px;
  background-color: white;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  min-width: 120px;
  z-index: 1000;
}

.user-menu-item {
  padding: 8px 16px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.3s;
}

.user-menu-item:hover {
  background-color: #f5f5f5;
}

.user-menu-item:last-child {
  border-top: 1px solid #f0f0f0;
  color: #ff4d4f;
}

/* 主容器 */
.main-container {
  display: flex;
  height: calc(100vh - 48px);
}

/* 左侧侧边栏 */
.sidebar {
  width: 200px;
  background: #001529;
  flex-shrink: 0;
}

.sidebar-menu {
  padding: 8px 0;
}

.menu-item {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 24px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.3s;
}

.menu-item:hover {
  color: #fff;
}

.menu-item.active {
  background: #1890ff;
  color: #fff;
}

.menu-icon {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-text {
  flex: 1;
}

.menu-arrow {
  width: 12px;
  height: 12px;
  font-size: 10px;
}

.submenu {
  background: #000c17;
}

.submenu-item {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 24px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.submenu-item:hover {
  color: #fff;
}

.submenu-item.active {
  background: #1890ff;
  color: #fff;
}

/* 主内容区 */
.main-content {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

/* 二级导航 */
.sub-nav {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 40px;
}

.sub-nav-item {
  padding: 0 16px;
  height: 40px;
  line-height: 40px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.sub-nav-item:hover {
  color: #1890ff;
}

.sub-nav-item.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}

/* 搜索区域 */
.search-area {
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 2px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.search-label {
  color: #666;
  white-space: nowrap;
}

.search-input {
  width: 180px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 12px;
  outline: none;
}

.search-input:focus {
  border-color: #1890ff;
}

.search-input::placeholder {
  color: #bfbfbf;
}

.btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-primary {
  background: #1890ff;
  color: #fff;
}

.btn-primary:hover {
  background: #40a9ff;
}

.btn-default {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #666;
}

.btn-default:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.btn-link {
  background: transparent;
  border: none;
  color: #1890ff;
  padding: 0 8px;
}

.expand-icon {
  margin-left: 4px;
  font-size: 10px;
}

/* 操作按钮区域 */
.action-bar {
  background: #fff;
  padding: 12px 16px;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-success {
  background: #52c41a;
  color: #fff;
}

.btn-success:hover {
  background: #73d13d;
}

.btn-danger {
  background: #f5222d;
  color: #fff;
  position: relative;
}

.btn-danger:hover {
  background: #ff4d4f;
}

/* 删除按钮上的选中数量角标 */
.btn-danger .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  background: #ffc53d;
  color: #333;
  border-radius: 9px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-info {
  background: #1890ff;
  color: #fff;
}

/* 提示信息 */
.alert-info {
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  padding: 8px 16px;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1890ff;
  font-size: 12px;
}

.alert-icon {
  width: 14px;
  height: 14px;
  background: #1890ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
}

/* 表格区域 */
.table-container {
  background: #fff;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  background: #fafafa;
  padding: 12px 8px;
  text-align: center;
  font-weight: 500;
  color: #666;
  border-bottom: 1px solid #e8e8e8;
  white-space: nowrap;
}

.data-table th:first-child {
  text-align: left;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 40px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 100px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 180px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 120px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 120px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 160px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
  width: 120px;
}

#dataTable th:nth-child(1),
#dataTable td:nth-child(1) {
  width: 40px;
}

#dataTable th:nth-child(2),
#dataTable td:nth-child(2) {
  width: 60px;
}

#dataTable th:nth-child(3),
#dataTable td:nth-child(3) {
  width: 100px;
}

#dataTable th:nth-child(4),
#dataTable td:nth-child(4) {
  width: 120px;
}

#dataTable th:nth-child(5),
#dataTable td:nth-child(5) {
  width: 120px;
}

#dataTable th:nth-child(6),
#dataTable td:nth-child(6) {
  width: 160px;
}

#dataTable th:nth-child(7),
#dataTable td:nth-child(7) {
  width: 160px;
}

#dataTable th:nth-child(8),
#dataTable td:nth-child(8) {
  width: 80px;
}

#dataTable th:nth-child(9),
#dataTable td:nth-child(9) {
  width: 120px;
}

#dataTable th:nth-child(10),
#dataTable td:nth-child(10) {
  width: 100px;
}

.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #e8e8e8;
  color: #333;
  white-space: nowrap;
  text-align: center;
}

.data-table td:first-child {
  text-align: left;
}

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

.checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.link-btn {
  color: #1890ff;
  cursor: pointer;
  margin-right: 8px;
}

.link-btn:hover {
  text-decoration: underline;
}

.more-btn {
  color: #1890ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* 分页 */
.pagination-bar {
  background: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e8e8e8;
}

.pagination-info {
  color: #666;
  margin-right: 8px;
}

.page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.page-btn.active {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.page-btn:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
}

.page-size-selector {
  height: 28px;
  border: 1px solid #d9d9d9;
  padding: 0 8px;
  font-size: 12px;
  color: #666;
  outline: none;
}



/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  width: 600px;
}

.user-management-modal {
  width: 800px;
  min-width: 800px;
}

.invite-code-modal-content {
  width: 400px !important;
  min-width: 400px;
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.modal-close {
  cursor: pointer;
  color: #999;
  padding: 4px;
}

.modal-close:hover {
  color: #666;
}

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

.form-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-item label {
  width: 80px;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.form-input {
  flex: 1;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 12px;
  outline: none;
}

.form-input:focus {
  border-color: #1890ff;
}

.modal-footer {
  padding: 16px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.invite-code-list {
  flex: 1;
  min-height: 80px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 12px;
  font-size: 12px;
  color: #333;
  background-color: #f9f9f9;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* 日期选择器输入框 */
.date-picker {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

/* 日期选择器弹窗 */
.date-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.date-picker-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 320px;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.date-picker-prev,
.date-picker-next {
  width: 32px;
  height: 32px;
  border: none;
  background-color: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-picker-prev:hover,
.date-picker-next:hover {
  background-color: #e8e8e8;
}

.date-picker-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 16px;
  background-color: #f9f9f9;
}

.date-picker-weekdays span {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 8px 0;
}

.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 16px;
}

.date-picker-days span {
  text-align: center;
  font-size: 12px;
  color: #333;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 4px;
}

.date-picker-days span:hover:not(:empty) {
  background-color: #e6f7ff;
}

.date-picker-days span.today {
  background-color: #1890ff;
  color: #fff;
}

.date-picker-days span.selected {
  background-color: #1890ff;
  color: #fff;
}

.date-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e8e8e8;
}

.date-picker-footer button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.date-picker-footer button:first-child {
  background-color: #f5f5f5;
  color: #666;
}

.date-picker-footer button:last-child {
  background-color: #1890ff;
  color: #fff;
}