/* ========== 全局重置与变量 ========== */
:root {
  --color-primary: #1e88e5; /* 示例主色，实际会被模板变量覆盖 */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family-base);
  background: #f5f7fa;
}

/* ========== 卡片容器优化 ========== */
.main-card {
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
  padding: 0.32rem 0.4rem;
}

.main-card-title {
  font-size: 0.28rem;
  line-height: 0.28rem;
  font-weight: 600;
}

/* ========== 基本信息区域 ========== */
.content-box {
  margin-top: 0.4rem;
}

.box-top {
  height: auto;
  min-height: 1rem;
  border-bottom: 1px solid #e6e7eb;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.2rem 0;
}

.right-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.name-text {
  font-size: 0.32rem;
  font-weight: bold;
  line-height: 1.2;
  color: #1e2736;
}

.name-country {
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
}

.country-img {
  height: 0.25rem;
  width: 0.4rem;
  object-fit: cover;
}

.attestation-status {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 0.04rem;
  flex-shrink: 0;
}

.attestation-status > img {
  width: 0.26rem;
  height: 0.26rem;
}

.attestation-text {
  cursor: pointer;
  margin-left: 0.1rem;
  font-size: 0.14rem;
  color: #1e2736;
  white-space: nowrap;
}

.bule-text {
  color: var(--color-primary) !important;
}

/* ========== 表单布局优化 ========== */
.box-main {
  margin-top: 0.4rem;
}

.basic > .el-row,
.account > .el-row {
  margin-top: 0.43rem;
}

/* PC 端保持三列，但增加间距自适应 */
@media screen and (min-width: 751px) {
  .el-col {
    padding-right: 0.3rem;
  }
  .el-col:last-child {
    padding-right: 0;
  }
}

.box-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.box-item-t {
  font-size: 0.13rem;
  font-weight: 500;
  height: 0.2rem;
  color: #8692b0;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.box-item-b {
  width: 100%;
}

.box-item-b > .el-input,
.box-item-b .el-select,
.box-item-b .el-textarea {
  width: 100%;
  max-width: 3.2rem;
  border: none;
  border-bottom: 1px solid #e6e7eb;
}

/* 自定义字段区域 flex 换行 */
.oauth-box {
  margin-top: 0.43rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.43rem;
}
.oauth-box .box-item {
  flex: 1 1 calc(33.33% - 0.29rem);
  min-width: 2rem;
}

.btn-save {
  width: 0.88rem;
  height: 0.32rem;
  margin-top: 0.43rem;
  background: var(--color-primary);
  border-radius: 4px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-save:hover {
  opacity: 0.85;
}

/* ========== 弹窗通用优化 ========== */
.el-dialog {
  border-radius: 16px;
}
.el-dialog__body {
  padding: 0.3rem 0.8rem;
  font-size: 0.16rem;
}
.dialog-title {
  font-size: 0.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.1rem;
}
.mian-form {
  margin-top: 0.4rem;
}
.dialog-footer {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.4rem;
}
.btn-ok, .btn-no {
  min-width: 1.2rem;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
}
.btn-ok {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-no {
  background: #fff;
  border: 1px solid #dcdfe6;
  color: #606266;
}

/* 验证码按钮 */
.code-btn {
  margin-left: 0.12rem;
  width: 1.3rem;
  background: #eef4ff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  cursor: pointer;
  user-select: none;
}

/* ========== 操作日志 & 消息 ========== */
.searchbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.2rem 0;
}
.msg-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem 0;
}
.msgsearch-left {
  display: flex;
  gap: 0.1rem;
}
.msgsearch-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  align-items: center;
}
.msgsearch-right .el-select {
  width: 2rem;
}
.search-btn {
  background: var(--color-primary);
  color: white;
  border: none;
}
.a-text {
  color: #171725;
  cursor: pointer;
}
.a-text:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.msg-status {
  margin-right: 0.05rem;
}
.is-read {
  color: #8692b0;
}
.no-read {
  color: var(--color-primary);
}

/* ========== 移动端完美适配 ========== */
@media screen and (max-width: 750px) {
  /* 卡片内边距缩小 */
  .main-card {
    padding: 0.2rem 0.24rem;
    border-radius: 0;
    box-shadow: none;
  }
  .main-card-title {
    font-size: 0.48rem;
    font-weight: 600;
  }
  .name-text {
    font-size: 0.4rem;
  }
  /* 认证状态换行 */
  .attestation-text {
    white-space: normal;
    font-size: 0.28rem;
  }
  /* 表单布局改为纵向 */
  .el-row {
    display: flex;
    flex-direction: column;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .el-col {
    width: 100% !important;
    padding: 0 !important;
  }
  .box-item-b > .el-input,
  .box-item-b .el-select,
  .box-item-b .el-textarea {
    max-width: 100%;
    width: 100%;
    margin-bottom: 0.4rem;
  }
  .box-item-t {
    font-size: 0.28rem;
    height: auto;
    margin-bottom: 0.2rem;
  }
  .el-input__inner,
  .el-textarea__inner {
    font-size: 0.32rem !important;
    height: 0.8rem !important;
    line-height: 0.8rem;
  }
  .btn-save {
    width: calc(100% - 0.6rem);
    margin: 0.6rem auto 0.4rem;
    height: 0.88rem;
    font-size: 0.34rem;
    border-radius: 8px;
  }
  /* 自定义字段每个占满宽度 */
  .oauth-box .box-item {
    flex: 1 1 100%;
  }
  /* 弹窗移动端全宽 */
  .el-dialog {
    width: 90% !important;
    margin: 20px auto !important;
    border-radius: 20px;
  }
  .el-dialog__body {
    padding: 0.3rem 0.4rem;
  }
  .dialog-title {
    font-size: 0.4rem;
  }
  .dialog-footer {
    flex-direction: column;
    gap: 0.2rem;
  }
  .btn-ok, .btn-no {
    width: 100%;
    height: 0.88rem;
    font-size: 0.34rem;
  }
  /* 验证码按钮 */
  .code-btn {
    width: 2rem;
    height: 0.8rem;
    font-size: 0.28rem;
  }
  /* 操作日志表格隐藏，显示移动卡片 */
  .tabledata {
    display: none;
  }
  .mobel {
    display: block;
  }
  /* 移动端消息搜索区调整 */
  .msg-search {
    flex-direction: column;
    align-items: stretch;
  }
  .msgsearch-left {
    justify-content: space-between;
  }
  .msgsearch-right {
    flex-direction: column;
  }
  .msgsearch-right .el-select,
  .msgsearch-right .el-input {
    width: 100% !important;
  }
  .search-btn {
    width: 100%;
    height: 0.8rem;
    font-size: 0.32rem;
  }
  /* 移动端卡片表格样式优化 */
  .mob-searchbar {
    margin-top: 0.2rem;
  }
  .mob-search-input {
    height: 0.8rem;
    background: #f2f3f7;
    border-radius: 8px;
  }
  .mob-tabledata {
    border: 1px solid #e6e7eb;
    border-radius: 12px;
    overflow: hidden;
  }
  .mob-tabledata-item {
    padding: 0.3rem;
    border-bottom: 1px solid #e6e7eb;
  }
  .mob-item-row1,
  .mob-item-row3 {
    font-size: 0.26rem;
    color: #8692b0;
  }
  .mob-item-row2-name {
    font-size: 0.32rem;
    font-weight: 500;
    display: block;
    word-break: break-all;
  }
  .back-top-img {
    width: 0.88rem;
    bottom: 1.5rem;
    right: 0.3rem;
  }
  /* 安全区域适配（全面屏） */
  .btn-save,
  .dialog-footer .btn-ok,
  .dialog-footer .btn-no,
  .back-top-img {
    margin-bottom: constant(safe-area-inset-bottom);
    margin-bottom: env(safe-area-inset-bottom);
  }
  /* 其他杂项 */
  .forget-pass {
    font-size: 0.28rem;
    margin-top: 0.1rem;
  }
  .select-input .el-input--suffix {
    width: auto;
  }
}

/* ========== 辅助样式 ========== */
.el-input.is-disabled .el-input__inner {
  background: #f5f7fa;
  color: #909399;
}
.edit-icon {
  cursor: pointer;
  font-size: 0.18rem;
  padding: 0 0.1rem;
}
.input-with-select .el-input-group__prepend {
  border: none;
  background: transparent;
  padding: 0 0.08rem;
}
.forget-pass > a {
  color: var(--color-primary);
  cursor: pointer;
}