/* ==========================================================================
   事项办理页面样式
   结构：1.基础  2.横幅  3.搜索筛选区  4.事项列表  5.分页
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 基础
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", 微软雅黑, Arial, sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.65);
  background: #fff;
  min-width: 1200px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

img {
  display: block;
}

/* 主题色变量 */
:root {
  --color-primary: #4393f5;
  --color-primary-light: #5aa5f8;
  --color-link: #1890ff;
  --color-text: rgba(0, 0, 0, 0.65);
  --color-text-dark: #333;
  --color-text-secondary: #666;
  --color-text-disabled: #ccc;
  --color-border: #d9d9d9;
  --color-divider: rgba(215, 216, 217, 0.5);
}

/* --------------------------------------------------------------------------
   2. 横幅
   -------------------------------------------------------------------------- */
.banner {
  height: 240px;
  background: url("../images/banner.png") no-repeat 0 0;
  background-size: 100% 100%;
}

.banner__inner {
  width: 1200px;
  margin: 0 auto;
  padding-top: 61px;
}

.banner__title {
  font-size: 40px;
  font-weight: 600;
  line-height: 56px;
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. 搜索筛选区
   -------------------------------------------------------------------------- */
.container {
  width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.toolbar {
  display: flex;
  align-items: center;
  padding: 20px 0;
}

/* 3.1 检索输入框 */
.search-input {
  position: relative;
  display: inline-block;
  width: 260px;
}

.search-input__field {
  width: 100%;
  height: 40px;
  padding: 4px 30px 4px 11px;
  border: 1px solid #d7d8d9;
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-text);
  outline: none;
}

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

.search-input__field:hover,
.search-input__field:focus {
  border-color: var(--color-primary);
}

.search-input__field:focus {
  box-shadow: 0 0 0 2px rgba(67, 147, 245, 0.15);
}

.search-input__icon {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}

/* 3.2 类型下拉 */
.select {
  position: relative;
  width: 120px;
  margin-left: 20px;
}

.select__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: var(--color-text);
  text-align: left;
}

.select__trigger:hover {
  border-color: var(--color-primary);
}

.select__value {
  flex: 1;
}

.select__arrow {
  width: 12px;
  height: 12px;
}

.select__dropdown {
  display: none;
  position: absolute;
  top: 42px;
  left: 0;
  z-index: 10;
  width: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.select.is-open .select__dropdown {
  display: block;
}

.select__option {
  padding: 5px 11px;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
}

.select__option:hover {
  background: #e6f7ff;
}

/* 3.3 复选框 */
.checkbox {
  display: inline-flex;
  align-items: center;
  margin-left: 20px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

.checkbox__input {
  display: none;
}

.checkbox__box {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox:hover .checkbox__box {
  border-color: var(--color-primary);
}

.checkbox__input:checked + .checkbox__box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox__input:checked + .checkbox__box::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* 3.4 事项总数 */
.toolbar__total {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   4. 事项列表
   -------------------------------------------------------------------------- */
/* 4.1 表头 */
.matter-list__header {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  background: #f5f5f5;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-top: 40px;
}

.matter-list__header-name {
  flex: 1;
}

.matter-list__header-action {
  text-align: right;
}

/* 4.2 分组 */
.matter-group {
  padding: 5px 0;
  border-bottom: 1px solid var(--color-divider);
}

.matter-group.is-hidden {
  display: none;
}

.matter-group__title {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
}

.matter-group__name {
  font-size: 16px;
  color: var(--color-text-dark);
}

/* 4.3 展开 / 收起按钮（含图标状态切换） */
.expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  margin-right: 15px;
  border: none;
  background: #f0f0f0;
  flex-shrink: 0;
}

.expand-btn__icon {
  width: 14px;
  height: 14px;
}

/* 默认展开态：显示收起箭头（向上） */
.expand-btn__icon--expand {
  display: none;
}

.expand-btn__icon--collapse {
  display: block;
}

/* 收起态：显示展开箭头（向下） */
.matter-group.is-collapsed .expand-btn__icon--expand {
  display: block;
}

.matter-group.is-collapsed .expand-btn__icon--collapse {
  display: none;
}

/* 4.4 事项行 */
.matter-group__items {
  display: block;
}

.matter-group.is-collapsed .matter-group__items {
  display: none;
}

.matter-item {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 20px 0 69px;
}

.matter-item.is-hidden {
  display: none;
}

.matter-item__name {
  flex: 1;
  font-size: 16px;
  color:  #333;
  text-decoration: none;
  cursor: pointer;
}

.matter-item__name:hover {
  color: #1890ff;
}

.matter-item__actions {
  white-space: nowrap;
}

/* 4.5 操作按钮 */
.btn {
  height: 32px;
  padding: 0 15px;
  margin-left: 12px;
  border: none;
  border-radius: 0;
  font-size: 14px;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-light);
}

.btn--ghost {
  background: #ebf2fc;
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: #ddeafd;
}

/* --------------------------------------------------------------------------
   5. 分页
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.pagination__total {
  margin-right: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.pagination__pages {
  display: flex;
  align-items: center;
}

.pagination__page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  cursor: pointer;
}

.pagination__page a {
  display: flex;
  color: inherit;
  text-decoration: none;
}

.pagination__page:not(.pagination__page--disabled):not(.pagination__jumper):hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination__page.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pagination__page--disabled {
  border: none;
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.pagination__icon {
  width: 14px;
  height: 14px;
}

.pagination__jumper {
  border: none;
  cursor: default;
}

.pagination__jumper-label {
  display: flex;
  align-items: center;
  color: var(--color-text);
}

.pagination__jumper-input {
  width: 50px;
  height: 32px;
  margin: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  outline: none;
}

.pagination__jumper-input:focus {
  border-color: var(--color-primary);
}