/**
 * Member frontend styles (Bootstrap 5 vendor is loaded separately in meta).
 */
html {
  font-size: 14px;
}
body {
  min-height: 100vh;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
}
a { text-decoration: none; }
a:hover { text-decoration: underline; }

.form-group { margin-bottom: 1rem; }
.control-label { font-weight: 500; margin-bottom: .35rem; }
/* 统一表单字号：lg 仅略增高，不放大字，避免各语言/浏览器字号不一致 */
.form-control,
.form-select,
.input-group-text,
.btn {
  font-size: 14px;
}
.input-lg,
.form-control-lg {
  min-height: calc(1.5em + 0.85rem + 2px);
  padding: 0.425rem 0.75rem;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 0.375rem;
}
.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 0.375rem;
}
.btn-block { display: block; width: 100%; }
.btn-default { --bs-btn-color: #374151; --bs-btn-bg: #fff; --bs-btn-border-color: #d1d5db; --bs-btn-hover-bg: #f3f4f6; }
.img-circle { border-radius: 50% !important; }
.img-responsive { max-width: 100%; height: auto; }
.hide { display: none !important; }
.pull-right { float: right !important; }
.pull-left { float: left !important; }
html[dir="rtl"] .pull-right { float: left !important; }
html[dir="rtl"] .pull-left { float: right !important; }
.clearfix::after { content: ""; display: table; clear: both; }
.input-group-btn {
  display: flex;
  align-items: stretch;
}
.input-group-btn > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* BS3 col-xs → BS5-like */
.col-xs-12 { flex: 0 0 auto; width: 100%; }
.col-xs-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.66666667%; }
.col-xs-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-2 { flex: 0 0 auto; width: 16.66666667%; }

.panel { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; margin-bottom: 1rem; }
.panel-default > .panel-heading,
.panel-heading { padding: .75rem 1rem; border-bottom: 1px solid #e5e7eb; }
.panel-body { padding: 1.15rem 1.25rem; }

.user-section {
  background: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: .75rem;
  border: 1px solid #e5e7eb;
}
.login-section {
  margin: 50px auto;
  width: min(460px, 100%);
  border-radius: .75rem;
  /* 勿 overflow:hidden：会裁掉区号下拉；圆角交给子元素 */
  overflow: visible;
}
.login-section .logon-tab {
  margin: -15px -15px 0;
  border-radius: .75rem .75rem 0 0;
  overflow: hidden;
}
.login-section .logon-tab > a {
  display: block;
  padding: 1rem;
  float: left;
  width: 50%;
  font-size: 1rem;
  text-align: center;
  color: #4b5563;
  background: #ececec;
  text-decoration: none;
  transition: background .2s ease;
}
.login-section .logon-tab > a:hover { background: #fafafa; text-decoration: none; }
.login-section .logon-tab > a.active { background: #fff; }
.login-section .login-main { padding: 2rem 2.25rem 1.25rem; }
.login-section .control-label { font-size: .8125rem; }
.login-section .n-bootstrap .form-group { position: relative; }
.login-section .n-bootstrap .input-group { position: inherit; }
.login-section .n-bootstrap .n-right {
  margin-top: 0;
  top: 0;
  position: absolute;
  left: 0;
  text-align: right;
  width: 100%;
}
.login-section .n-bootstrap .n-right .msg-wrap { position: relative; }

main.content {
  width: 100%;
  /* 纵向可滚；横向 visible，避免裁切区号下拉 */
  overflow-x: visible;
  overflow-y: auto;
  padding: 1rem;
  min-height: calc(100vh - 120px);
}

.sidenav {
  padding: 1rem 0 .5rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
}
.sidenav .list-group { margin-bottom: 0; }
.sidenav .list-group .list-group-heading {
  list-style: none;
  color: #919191;
  margin: 0 0 .5rem 1.75rem;
  font-size: .875rem;
}
.sidenav .list-group .list-group-item {
  border: none;
  border-radius: 0;
  padding: 0;
  border-left: 2px solid transparent;
  background: transparent;
}
.sidenav .list-group .list-group-item:hover {
  border-left-color: rgba(245, 245, 245, .9);
  background: rgba(245, 245, 245, .5);
}
.sidenav .list-group .list-group-item > a {
  display: block;
  color: #4b5563;
  padding: .65rem 1rem .65rem 1.75rem;
  text-decoration: none;
}
.sidenav .list-group .list-group-item.active {
  border-left-color: #46c37b;
  background: rgba(245, 245, 245, .5);
}
.sidenav .list-group .list-group-item.active > a { color: #46c37b; }

.avatar-text,
.avatar-img {
  display: inline-block;
  box-sizing: content-box;
  color: #fff;
  text-align: center;
  vertical-align: top;
  background-color: #e8ecf3;
  width: 48px;
  height: 48px;
  border-radius: 48px;
  font-size: 24px;
  line-height: 48px;
}
.avatar-img { font-size: 0; }
.avatar-img img {
  border-radius: 48px;
  width: 48px;
  height: 48px;
}

.toast-top-center { top: 60px; }

/* Mobile + dial code：号码/区号始终 LTR，避免 RTL 把 +86 显示成 86+，并防止下拉被裁切 */
.mobile-phone-row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
  direction: ltr;
  unicode-bidi: isolate;
  position: relative;
}
.mobile-phone-row .mobile-input {
  flex: 1;
  min-width: 0;
  text-align: start;
}
.dial-code {
  position: static;
  flex: 0 0 auto;
  min-width: 5.5rem;
  width: auto;
  z-index: 5;
}
.dial-code.is-open {
  z-index: 40;
}
.dial-code-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding-inline: .75rem .6rem;
  text-align: start;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
}
.dial-code-value {
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  direction: ltr;
}
.dial-code-caret {
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #9ca3af;
  margin-top: 4px;
  flex: 0 0 auto;
  transition: transform .15s ease;
}
.dial-code.is-open .dial-code-caret { transform: rotate(180deg); margin-top: -2px; border-top-color: transparent; border-bottom-color: #9ca3af; }
.dial-code-menu {
  /* 相对 .mobile-phone-row，整行宽展开，RTL 也不会裁到卡片外 */
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  width: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  padding: .5rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.dial-code-search { margin-bottom: .5rem; }
.dial-code-list { max-height: 220px; overflow: auto; }
.dial-code-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 0;
  background: transparent;
  padding: .45rem .55rem;
  border-radius: .375rem;
  cursor: pointer;
  text-align: start;
}
.dial-code-option:hover { background: #f3f4f6; }
.dial-opt-name {
  color: #111827;
  font-size: .875rem;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dial-opt-code {
  color: #6b7280;
  font-size: .8125rem;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  flex: 0 0 auto;
}
.dial-code-empty { padding: .75rem; color: #9ca3af; font-size: .875rem; text-align: center; }

/* 前台 type:1 表单弹层（忘记密码 / 改邮箱手机）：流式布局，禁止绝对定位底栏 */
.resetpwd-form,
.yetu-layer-form {
  padding: 0;
  margin: 0;
  min-width: 0;
  height: auto !important;
  overflow: visible !important;
}
.resetpwd-form .control-label,
.yetu-layer-form .control-label {
  display: block;
  margin-bottom: .35rem;
  font-weight: 500;
}
.resetpwd-form .form-group,
.yetu-layer-form .form-group {
  margin-bottom: 1rem;
}
.resetpwd-form .form-group.mb-0,
.yetu-layer-form .form-group.mb-0 {
  margin-bottom: 0;
}
.resetpwd-type .btn { flex: 1; }
/* 覆盖旧 .form-layer 绝对定位（若残留） */
.form-layer .form-body,
.form-layer .form-footer {
  position: static !important;
  height: auto !important;
  bottom: auto !important;
  top: auto !important;
  overflow: visible !important;
  background: transparent !important;
  padding: 0 !important;
  line-height: inherit !important;
}
.layui-layer-yetuadmin.layui-layer-page .layui-layer-content {
  padding: 1.25rem 1.5rem 1.5rem !important;
  overflow: visible !important;
  height: auto !important;
}
.layui-layer-yetuadmin .layui-layer-title {
  padding: 0 1.5rem;
  height: 48px;
  line-height: 48px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1rem;
}

/* Frontend navbar right */
.frontend-nav-right {
  gap: .35rem .75rem !important;
}
.frontend-nav-right > .nav-item > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .65rem;
  border-radius: .5rem;
  color: #374151;
  line-height: 1.2;
}
.frontend-nav-right > .nav-item > .nav-link:hover,
.frontend-nav-right > .nav-item > .nav-link:focus,
.frontend-nav-right > .nav-item > .nav-link.show {
  background: #f3f4f6;
  color: #111827;
}
.frontend-nav-right .nav-avatar {
  padding: .25rem !important;
}
.frontend-nav-right .avatar-img,
.frontend-nav-right .avatar-img img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}
.frontend-nav-right .avatar-img {
  border: 1px solid #e5e7eb;
  box-sizing: content-box;
  background: #e8ecf3;
}
.frontend-nav-right .dropdown-menu {
  min-width: 10rem;
  padding: .4rem 0;
  border: 1px solid #e5e7eb;
  border-radius: .65rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .1);
  margin-top: .4rem !important;
}
.frontend-nav-right .dropdown-item {
  padding: .45rem 1rem;
  font-size: .9rem;
}
.frontend-nav-right .lang-switch-link,
.frontend-nav-right .currency-switch-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: #4b5563 !important;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.frontend-nav-right .lang-switch-icon,
.frontend-nav-right .currency-switch-icon {
  font-size: .95rem;
  line-height: 1;
  color: #6b7280;
  flex: 0 0 auto;
}
.frontend-nav-right .lang-switch-link:hover,
.frontend-nav-right .lang-switch-link.show,
.frontend-nav-right .currency-switch-link:hover,
.frontend-nav-right .currency-switch-link.show {
  color: #111827 !important;
  background: #f3f4f6;
  border-color: #d1d5db;
}
.frontend-nav-right .lang-switch-link:hover .lang-switch-icon,
.frontend-nav-right .lang-switch-link.show .lang-switch-icon,
.frontend-nav-right .currency-switch-link:hover .currency-switch-icon,
.frontend-nav-right .currency-switch-link.show .currency-switch-icon {
  color: #374151;
}

@media (max-width: 767.98px) {
  main.content { padding: 1rem 0; }
  .login-section { margin: 1.25rem auto; }
  .login-section .login-main { padding: 1.25rem 0 0; }
  .dial-code { width: 6.5rem; }
}
