/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  background: #f5f5f5;
  padding: 20px;
  padding-top: 60px;
}

.login-box {
  background: transparent;
  padding: 0;
  width: 100%;
  max-width: 400px;
}

.login-title {
  text-align: center;
  margin-bottom: 15px;
  color: #000;
  font-size: 28px;
  font-weight: bold;
}

.login-tip {
  text-align: center;
  margin-bottom: 40px;
  color: #000;
  font-size: 14px;
}

.login-form {
  width: 100%;
}

.login-form .el-form-item {
  margin-bottom: 20px;
}

.login-input {
  width: 100%;
}

.login-input .el-input__wrapper {
  background-color: #e8e8e8;
  border-radius: 8px;
  box-shadow: none;
  padding: 14px 15px;
  border: none;
}

.login-input .el-input__wrapper:hover {
  box-shadow: none;
  background-color: #e0e0e0;
}

.login-input .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px #409EFF inset;
  background-color: #e8e8e8;
}

.login-input .el-input__inner {
  background-color: transparent;
  color: #333;
  font-size: 15px;
}

.login-input .el-input__inner::placeholder {
  color: #999;
}

.input-icon {
  color: #666;
  font-size: 18px;
  margin-right: 8px;
}

.get-code-btn {
  color: #409EFF !important;
  font-size: 14px;
  padding: 0 10px;
  font-weight: 500;
}

.get-code-btn:hover {
  color: #66b1ff !important;
}

.get-code-btn.is-disabled {
  color: #ccc !important;
}

.login-submit-btn {
  width: 100%;
  background-color: #409EFF !important;
  border-color: #409EFF !important;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  padding: 16px 0;
  margin-top: 20px;
  height: auto;
}

.login-submit-btn:hover {
  background-color: #66b1ff !important;
  border-color: #66b1ff !important;
}

.login-submit-btn.is-loading {
  background-color: #409EFF !important;
  border-color: #409EFF !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .login-container {
    padding: 20px 15px;
    padding-top: 40px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-tip {
    font-size: 13px;
    margin-bottom: 30px;
  }
}

/* 页面容器样式 */
.page-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
}

/* 角色列表样式 */
.role-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.role-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.default-role {
  border: 2px solid #409EFF;
}

.role-info {
  padding: 12px;
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.role-header h3 {
  margin: 0;
  color: #333;
}

.role-details p {
  margin: 10px 0;
  color: #666;
}

.role-details span {
  font-weight: bold;
  color: #333;
}

/* 绑定表单样式 */
.bind-form-container {
  max-width: 600px;
  margin: 0 auto;
  margin-top: 20px;
}

.bind-tips {
  padding: 10px 0;
  text-align: left;
  /* 与身份证号等表单项的标签左边对齐（整体左移 label-width 120px） */
  margin-left: -120px;
}

.bind-tips h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.tip-item {
  line-height: 1.8;
}

.tip-item p {
  margin: 8px 0;
}

.tip-item strong {
  color: #303133;
  font-weight: 600;
}

/* 管理后台样式 */
.admin-container {
  padding: 20px 0;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.pagination-container {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* 角色管理页面样式 */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.role-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #ebeef5;
  justify-content: center;
}

/* 切换角色弹窗样式 */
.switch-role-dialog {
  padding: 10px 0;
}

.switch-role-table-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.switch-role-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.switch-role-table-header {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 10;
}

.switch-role-table-header th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.switch-role-table-header th:first-child {
  width: 25%;
}

.switch-role-table-header th:nth-child(2) {
  width: 25%;
}

.switch-role-table-header th:nth-child(3) {
  width: 15%;
}

.switch-role-table-header th:last-child {
  width: 35%;
}

.switch-role-table-body tr {
  border-bottom: 1px solid #e5e7eb;
}

.switch-role-table-body tr:hover {
  background: #f3f4f6;
}

.switch-role-table-body td {
  padding: 12px 15px;
  color: #606266;
}

.switch-role-table-body tr:last-child {
  border-bottom: none;
}

/* ===== 全局 Element Plus 覆盖：Apple 风格 ===== */

/* 页面背景与基础排版已经在 index.html 中设置为浅灰，这里主要处理组件外观 */

/* 卡片：柔和圆角 + 轻微阴影 */
.el-card {
  border-radius: 18px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06) !important;
  background-color: #ffffff !important;
}

.el-card__header {
  border-bottom-color: #e5e7eb !important;
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

/* 表格：干净的卡片内表格风格 */
.el-table {
  --el-table-border-color: #e5e7eb;
  --el-table-header-text-color: #6b7280;
  --el-table-header-bg-color: #f9fafb;
  --el-table-row-hover-bg-color: #f3f4f6;
  background-color: transparent;
}

.el-table__inner-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.el-table th.el-table__cell {
  font-weight: 500;
  font-size: 13px;
}

.el-table td.el-table__cell {
  font-size: 13px;
  color: #374151;
}

/* 输入框：非登录页统一 Apple 风 */
.page-container .el-input__wrapper,
.admin-container .el-input__wrapper,
.bind-form-container .el-input__wrapper,
.bind-pay-container .el-input__wrapper {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
}

.page-container .el-input__wrapper.is-focus,
.admin-container .el-input__wrapper.is-focus,
.bind-form-container .el-input__wrapper.is-focus,
.bind-pay-container .el-input__wrapper.is-focus {
  border-color: #409EFF;
  box-shadow: 0 0 0 1px rgba(64, 158, 255, 0.4);
}

.page-container .el-input__inner,
.admin-container .el-input__inner,
.bind-form-container .el-input__inner,
.bind-pay-container .el-input__inner {
  font-size: 14px;
}

/* Tabs：顶部导航类似 iOS 设置分组 */
.el-tabs__header {
  margin-bottom: 16px;
}

.el-tabs__nav-wrap::after {
  background-color: transparent;
}

.el-tabs__item {
  padding: 0 18px !important;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
  color: #6b7280;
}

.el-tabs__item.is-active {
  color: #111827;
  font-weight: 600;
}

.el-tabs__active-bar {
  height: 2px;
  border-radius: 999px;
  background-color: #409EFF;
}

/* 按钮：统一圆角、稍大一点，接近 iOS 按钮感觉 */
.el-button {
  border-radius: 999px;
  font-weight: 500;
}

.el-button--primary {
  background-color: #409EFF;
  border-color: #409EFF;
}

.el-button--primary:hover {
  background-color: #66b1ff;
  border-color: #66b1ff;
}

.el-button--danger {
  background-color: #ef4444;
  border-color: #ef4444;
}

.el-button--danger:hover {
  background-color: #f87171;
  border-color: #f87171;
}

/* 分页器：更轻盈的外观 */
.el-pagination {
  --el-pagination-bg-color: transparent;
  --el-pagination-button-disabled-bg-color: transparent;
}

.el-pagination .btn-prev,
.el-pagination .btn-next,
.el-pagination .el-pager li {
  border-radius: 999px;
}

/* 弹窗：大圆角 + 细分割线 */
.el-dialog {
  border-radius: 18px !important;
}

.el-dialog__header {
  margin-right: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.el-dialog__title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.el-dialog__footer {
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* 绑定表单与支付绑定布局 */
.bind-form-container .el-card {
  padding: 4px 4px 8px;
}

.bind-pay-container {
  max-width: 720px;
  margin: 0 auto;
  margin-top: 24px;
}

.bind-card {
  border-radius: 18px !important;
}

.bind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: #374151;
}

.bind-row span:first-child {
  color: #6b7280;
}

.bind-card .tips {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
}

/* 小屏幕下整体留白稍微缩小一些 */
@media (max-width: 768px) {
  .page-container {
    padding: 20px 12px 28px;
  }

  .el-card {
    border-radius: 16px !important;
  }
}
