* { box-sizing: border-box; }

html, body, #root {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  background: #f0f2f5;
}

.layout-root {
  display: flex;
  min-height: 100vh;
}

/* ========== 左侧导航 ========== */
.sider {
  width: 220px;
  flex-shrink: 0;
  background: #001529;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.2s;
}

.layout-root.collapsed .sider { width: 64px; }

.sider-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 20px;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sider-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f5a623 0%, #e67e22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sider-logo-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.layout-root.collapsed .sider-logo-text,
.layout-root.collapsed .menu-group-title span:not(.menu-icon),
.layout-root.collapsed .menu-arrow,
.layout-root.collapsed .menu-sub {
  display: none;
}

.layout-root.collapsed .sider-logo { padding: 0; justify-content: center; }
.layout-root.collapsed .menu-group-title { padding: 0; justify-content: center; }

.sider-menu { padding: 8px 0 24px; }

.menu-group-title {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px 0 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.menu-group-title:hover { color: #fff; }

.menu-group-title.locked {
  cursor: default;
}

.menu-group-title.locked:hover {
  color: rgba(255, 255, 255, 0.65);
}

.menu-group-title .menu-icon {
  font-size: 14px;
  width: 14px;
  text-align: center;
  opacity: 0.85;
}

.menu-group-title .menu-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
  opacity: 0.65;
}

.menu-group-title.expanded .menu-arrow { transform: rotate(180deg); }

.menu-sub {
  display: none;
  background: #000c17;
}

.menu-sub.open { display: block; }

.menu-item {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px 0 48px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

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

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

.menu-item.locked {
  cursor: default;
}

.menu-item.locked:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ========== 右侧主区 ========== */
.main {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f0f2f5;
  transition: margin-left 0.2s;
}

.layout-root.collapsed .main { margin-left: 64px; }

.header {
  height: 48px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 12px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.header-trigger {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.65);
  font-size: 16px;
  border-radius: 4px;
}

.header-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.88);
}

.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
  gap: 8px;
}

.breadcrumb .sep { color: rgba(0, 0, 0, 0.25); }
.breadcrumb .current { color: rgba(0, 0, 0, 0.88); }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(0, 0, 0, 0.65);
  font-size: 13px;
}

.header-time { white-space: nowrap; }

.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.88);
}

.header-icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.65);
  font-size: 16px;
  position: relative;
  border-radius: 4px;
}

.header-icon-btn:hover { background: rgba(0, 0, 0, 0.04); }

.header-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  font-weight: 500;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1677ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* ========== Tabs + 右侧工具 ========== */
.page-tabs {
  background: #fff;
  height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #f0f0f0;
}

.page-tabs-left {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.page-tab {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  user-select: none;
  margin-bottom: -1px;
}

.page-tab.active {
  background: #fff;
  color: #1677ff;
  border-color: #f0f0f0;
  border-bottom: 1px solid #fff;
  position: relative;
}

.page-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #1677ff;
}

.page-tab .tab-close {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.45);
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.page-tab .tab-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.88);
}

.page-tabs-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 4px;
}

/* ========== 内容区 ========== */
.content {
  padding: 12px 16px 16px;
  flex: 1;
}

.content-card {
  background: #fff;
  border-radius: 6px;
  padding: 16px 16px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ========== 筛选 ========== */
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.filter-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  line-height: 32px;
  white-space: nowrap;
}

.filter-field-body { display: flex; flex-direction: column; }

.tz-hint {
  color: #ff4d4f;
  font-size: 12px;
  line-height: 22px;
  margin-top: 2px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 32px;
}

.filter-row .ant-select { width: 140px !important; }

.filter-row .ant-input-affix-wrapper,
.filter-row .member-id-input {
  width: 280px !important;
  height: 32px !important;
}

.filter-row .ant-input-affix-wrapper {
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
}

.filter-row .ant-input-affix-wrapper .ant-input {
  height: auto !important;
  line-height: 30px;
}

.filter-row .ant-select-selector {
  height: 32px !important;
  align-items: center !important;
}

.filter-row .ant-select-selection-item,
.filter-row .ant-select-selection-placeholder {
  line-height: 30px !important;
}

.filter-row .ant-picker {
  height: 32px;
  width: 260px;
}

.filter-row .ant-btn {
  height: 32px;
  padding: 0 15px;
  font-size: 14px;
  border-radius: 6px;
}

.filter-row .ant-btn-default {
  border-color: #d9d9d9;
  color: rgba(0, 0, 0, 0.88);
  background: #fff;
}

.filter-row .ant-btn-primary {
  background: #1677ff;
  border-color: #1677ff;
}

/* ========== 操作栏 ========== */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

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

.action-btns .ant-btn {
  height: 32px;
  padding: 0 15px;
  border-radius: 6px;
  font-size: 14px;
}

.toolbar-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.55);
  font-size: 15px;
  border-radius: 4px;
}

.toolbar-icon:hover {
  color: #1677ff;
  background: rgba(22, 119, 255, 0.06);
}

/* ========== 表格 ========== */
.audit-table .ant-table { font-size: 14px; }

.audit-table .ant-table-thead > tr > th {
  background: #fafafa !important;
  color: rgba(0, 0, 0, 0.88);
  font-weight: 600;
  padding: 10px 12px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  text-align: center !important;
  white-space: nowrap;
}

.audit-table .ant-table-tbody > tr > td {
  padding: 9px 12px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  text-align: center;
  color: rgba(0, 0, 0, 0.88);
  height: 46px;
}

.audit-table .ant-table-tbody > tr:hover > td {
  background: #fafafa !important;
}

.link-id {
  color: #1677ff;
  cursor: pointer;
}

.link-id:hover { color: #4096ff; }

.status-undone { color: #ff4d4f; }
.status-done { color: #52c41a; }
.status-released { color: #8c8c8c; }

.op-eye {
  color: #1677ff;
  font-size: 16px;
  cursor: pointer;
}

.op-eye:hover { color: #4096ff; }

.audit-table .ant-pagination {
  margin: 12px 0 8px !important;
  justify-content: flex-end;
}

.audit-table .ant-pagination-total-text {
  color: rgba(0, 0, 0, 0.65);
}

.modal-hint {
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  margin-top: 4px;
}
