/* ============================================================
   rhex-account-polish.css — 账号相关页精修
   覆盖 /settings（设置与通知偏好）与 /notifications（通知列表）
   与 rhex-page.css / rhex-user-polish.css 同一套视觉语言：
   白卡 12-14 圆角、浅描边、橙色主色、38px 控件高度、暗色完整。
   ============================================================ */

/* ---------- 1. 版心与节奏 ---------- */
.SettingsPage {
  max-width: 760px;
  padding-bottom: 28px;
}

.SettingsPage > ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.SettingsPage > ul > li {
  margin: 0 0 28px;
}

.SettingsPage .FieldSet-label {
  display: block;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.1px;
  color: #1f2328;
}

.SettingsPage .FieldSet-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

/* 设置页头卡：与版心对齐，别拉满整屏 */
.Page.UserPage:has(.SettingsPage) .Page-hero {
  padding: 18px 0 0 !important;
}

.Page.UserPage:has(.SettingsPage) .Page-hero .UserCard.Hero {
  max-width: 1100px;
  margin: 0 auto;
}

.Page.UserPage:has(.SettingsPage) .Page-hero .Button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e9ebef;
  border-radius: 9px;
  background: #fff;
  color: #5f6670;
  font-size: 13px;
  font-weight: 500;
}

.Page.UserPage:has(.SettingsPage) .Page-hero .Button:hover {
  border-color: #ffd5bd;
  background: #fff7f2;
  color: #e3540f;
}

/* ---------- 2. 按钮 ---------- */
.SettingsPage .Button {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #e9ebef;
  border-radius: 10px;
  background: #fff;
  color: #3d4450;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.SettingsPage .Button:hover {
  border-color: #ffd5bd;
  background: #fff7f2;
  color: #e3540f;
}

.SettingsPage .Button:active {
  background: #fff2ec;
}

/* ---------- 3. 通知偏好表格 ---------- */
.SettingsPage .NotificationGrid {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-size: 13px;
}

.SettingsPage .NotificationGrid thead th,
.SettingsPage .NotificationGrid thead td {
  background: #fafbfc;
  border-bottom: 1px solid #eef0f3;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #8a919b;
}

.SettingsPage .NotificationGrid thead th .icon {
  display: inline-block;
  color: #a8aeb7;
  margin: 0 4px 0 0;
}

.SettingsPage .NotificationGrid thead th {
  white-space: nowrap;
}

.SettingsPage .NotificationGrid tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f5f7;
  color: #4a5159;
  font-size: 13px;
  line-height: 1.5;
}

.SettingsPage .NotificationGrid tbody tr:last-child td {
  border-bottom: 0;
}

.SettingsPage .NotificationGrid tbody tr:hover {
  background: #fcfcfd;
}

.SettingsPage .NotificationGrid td:first-child .icon {
  width: 14px;
  margin-right: 8px;
  text-align: center;
  color: #b3b9c2;
}

.SettingsPage .NotificationGrid .NotificationGrid-checkbox {
  text-align: center;
  width: 82px;
}

.SettingsPage .NotificationGrid .Checkbox {
  display: inline-flex;
  justify-content: center;
}

/* 开关：站内橙代替默认绿 */
.SettingsPage {
  --switch-on-color: #f26322;
}

/* ---------- 4. 主题样式选择 ---------- */
.SettingsPage .ThemeMode {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #e9ebef;
  border-radius: 12px;
  padding: 5px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.SettingsPage .ThemeMode:hover {
  border-color: #ffd5bd;
}

.SettingsPage .ThemeMode.ThemeMode--active {
  border-color: #ffc7a6;
  box-shadow: 0 0 0 2px rgba(242, 99, 34, .12);
}

.SettingsPage .ThemeMode-preview {
  border-radius: 8px;
  overflow: hidden;
}

/* ---------- 5. 通知列表页 ---------- */
.NotificationList {
  max-width: 760px;
  margin: 18px auto 0;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px -10px rgba(16, 24, 40, .18);
}

.NotificationList .HeaderList-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f3f5;
  background: #fff;
}

.NotificationList .HeaderList-header .Button--link {
  color: #9aa0a6;
}

.NotificationList .HeaderList-header .Button--link:hover {
  color: #e3540f;
}

.NotificationList .HeaderList-empty {
  padding: 64px 24px 68px;
  text-align: center;
  color: #9aa0a6;
  font-size: 14px;
  line-height: 1.7;
}

.NotificationList .HeaderList-empty::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fafbfc url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b9c2' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M6.5 9.6a5.5 5.5 0 0 1 11 0v3.2c0 1 .4 1.9 1.2 2.5H5.3c.8-.6 1.2-1.5 1.2-2.5z'/%3E%3Cpath d='M9.8 18.2a2.4 2.4 0 0 0 4.4 0'/%3E%3C/svg%3E") center/26px 26px no-repeat;
  border: 1px solid #eef0f3;
}

/* ---------- 6. 暗色 ---------- */
[data-theme="dark"] .SettingsPage .FieldSet-label,
[data-theme="dark"] .SettingsPage .Button {
  color: #e5e7eb;
}

[data-theme="dark"] .SettingsPage .Button {
  background: #1c2027;
  border-color: #2b3038;
}

[data-theme="dark"] .SettingsPage .Button:hover {
  background: rgba(242, 99, 34, .14);
  border-color: rgba(242, 99, 34, .35);
  color: #ff8a4d;
}

[data-theme="dark"] .SettingsPage .NotificationGrid {
  background: #171a1f;
  border-color: #24282f;
}

[data-theme="dark"] .SettingsPage .NotificationGrid thead th,
[data-theme="dark"] .SettingsPage .NotificationGrid thead td {
  background: #1c2027;
  border-bottom-color: #24282f;
  color: #8a919b;
}

[data-theme="dark"] .SettingsPage .NotificationGrid tbody td {
  border-bottom-color: #22262d;
  color: #a6adb8;
}

[data-theme="dark"] .SettingsPage .NotificationGrid td:first-child .icon {
  color: #666e78;
}

[data-theme="dark"] .SettingsPage .ThemeMode {
  background: #1c2027;
  border-color: #2b3038;
}

[data-theme="dark"] .NotificationList {
  background: #171a1f;
  border-color: #24282f;
  box-shadow: none;
}

[data-theme="dark"] .NotificationList .HeaderList-header {
  background: #171a1f;
  border-bottom-color: #24282f;
}

[data-theme="dark"] .NotificationList .HeaderList-empty {
  color: #7f8791;
}

/* ---------- 7. 移动端 ---------- */
@media (max-width: 767.98px) {
  .SettingsPage {
    max-width: none;
    padding: 0 14px 24px;
  }

  .SettingsPage > ul > li {
    margin-bottom: 22px;
  }

  .SettingsPage .FieldSet-label {
    font-size: 14.5px;
    margin-bottom: 9px;
  }

  .SettingsPage .Button {
    height: 36px;
    padding: 0 13px;
    font-size: 13px;
  }

  .SettingsPage .NotificationGrid {
    font-size: 12.5px;
    border-radius: 10px;
  }

  .SettingsPage .NotificationGrid thead th,
  .SettingsPage .NotificationGrid thead td {
    padding: 8px 9px;
  }

  .SettingsPage .NotificationGrid tbody td {
    padding: 9px;
    font-size: 12.5px;
  }

  .SettingsPage .NotificationGrid .NotificationGrid-checkbox {
    width: 56px;
  }

  .SettingsPage .ThemeMode {
    flex: 0 0 calc(50% - 5px);
    width: auto;
    margin: 0;
  }

  .NotificationList {
    max-width: none;
    margin: 12px 14px 0;
    border-radius: 12px;
  }

  /* 手机上这排操作按钮被 Flarum 内联隐藏，留着只剩一条空白带 */
  .NotificationList .HeaderList-header {
    display: none;
  }

  .NotificationList .HeaderList-empty {
    padding: 52px 18px;
    font-size: 13.5px;
  }
}
