/* =====================================================================
   ps-auth.css —— 账号（注册/登录/忘记密码）、询价车、帮助中心、顶栏用户态
   配色沿用站点主色 --base-color（#EB6100），所有文字 ≥13px（平哥铁律）
   ===================================================================== */

:root {
  --psa-orange: #EB6100;
  --psa-orange-h: #c95200;
  --psa-ink: #1f1f1c;
  --psa-gray: #77776f;
  --psa-line: #e3e3dd;
}

/* 藏元素专用：原站 Tailwind 有 .flex{display:flex!important}，inline display:none 会被它打败 */
.ps-hide { display: none !important; }

/* ---------- 1. 表单通用 ---------- */
.psa-msg {
  display: none;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}
.psa-msg.on { display: block; }
.psa-msg.err { background: #fdecec; border: 1px solid #f5bcbc; color: #a32121; }
.psa-msg.ok { background: #eaf7ee; border: 1px solid #b6e0c2; color: #1b6b35; }
.psa-msg a { color: inherit; font-weight: 700; text-decoration: underline; }

/* 密码框右侧图标的定位容器。
   注意：输入框聚焦后 Tailwind 的 focus:z-10 会把它压到下面，导致「小眼睛」点不动，
   所以这里必须给一个比 10 大的层级。 */
.psa-icon,
div.absolute:has(> .psa-eye) { z-index: 11; }

/* 密码框的「小眼睛」按钮 */
.psa-eye {
  background: none;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  color: #9a9a93;
  display: flex;
  align-items: center;
  min-height: 24px;
}
.psa-eye:hover { color: var(--psa-orange); }
.psa-eye svg { width: 20px; height: 20px; }

/* 社媒登录按钮（点击后给出说明，见 ps-auth.js） */
.psa-social { cursor: pointer; }
.psa-social[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 2. 顶栏用户态 ---------- */
.psa-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  max-width: 190px;
}
.psa-user .psa-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--psa-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.psa-user .psa-mail {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 132px;
}
.psa-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
  min-width: 200px;
  padding: 7px 0;
  z-index: 400;
  display: none;
}
.psa-menu.on { display: block; }
.psa-menu a,
.psa-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
  color: #33332e;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.psa-menu a:hover,
.psa-menu button:hover { background: #fff7f0; color: var(--psa-orange); }
.psa-menu .psa-sep { height: 1px; background: #eee; margin: 5px 0; }
.psa-menu .psa-menu-head {
  padding: 7px 16px 5px;
  font-size: 12px;
  color: #9a9a93;
  letter-spacing: .04em;
  word-break: break-all;
  white-space: normal;
}
body.psa-dark-header header { background: #111827 !important; }

/* ---------- 3. 商品卡「加入询价车」按钮 ---------- */
.psa-add {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .94);
  color: var(--psa-orange);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s, transform .18s;
}
.custom-card:hover .psa-add { opacity: 1; }
.psa-add:hover { transform: scale(1.1); background: var(--psa-orange); color: #fff; }
.psa-add svg { width: 18px; height: 18px; }
.psa-add.done { background: #1b6b35; color: #fff; }

/* ---------- 4. 轻提示 ---------- */
#psaToast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  background: #1f1f1c;
  color: #fff;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  max-width: 88vw;
  text-align: center;
}
#psaToast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 5. 询价车页 ---------- */
.psa-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 18px 90px;
}
.psa-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--psa-ink);
  margin: 0 0 6px;
}
.psa-sub {
  font-size: 14px;
  color: var(--psa-gray);
  margin: 0 0 22px;
  line-height: 1.7;
}
.psa-grid { display: flex; gap: 22px; align-items: flex-start; }
.psa-main { flex: 1 1 auto; min-width: 0; }
.psa-side { flex: 0 0 300px; }

.psa-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--psa-line);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.psa-item img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: #f5f5f4;
  flex: 0 0 auto;
}
.psa-item .psa-info { flex: 1 1 auto; min-width: 0; }
.psa-item .psa-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--psa-ink);
  line-height: 1.5;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.psa-item .psa-meta { font-size: 13px; color: var(--psa-gray); margin: 0 0 9px; }
.psa-item .psa-meta a { color: var(--psa-orange); text-decoration: none; }
.psa-item .psa-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.psa-qty { display: flex; align-items: center; border: 1px solid var(--psa-line); border-radius: 9px; overflow: hidden; }
.psa-qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: #fafaf8;
  color: #444;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.psa-qty button:hover { background: #f0f0ec; }
.psa-qty input {
  width: 52px;
  height: 34px;
  border: 0;
  border-left: 1px solid var(--psa-line);
  border-right: 1px solid var(--psa-line);
  text-align: center;
  font-size: 14px;
  font-family: inherit;
  color: var(--psa-ink);
}
.psa-price { font-size: 15px; font-weight: 800; color: var(--psa-orange); margin-left: auto; }
.psa-del {
  background: none;
  border: 0;
  color: #b0b0a8;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
}
.psa-del:hover { color: #c53030; }

.psa-card {
  background: #fff;
  border: 1px solid var(--psa-line);
  border-radius: 14px;
  padding: 18px;
}
.psa-card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--psa-ink); }
.psa-line { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; color: #44443e; }
.psa-line b { color: var(--psa-ink); }
.psa-total { border-top: 1px dashed var(--psa-line); margin-top: 8px; padding-top: 12px; font-size: 16px; }
.psa-total b { color: var(--psa-orange); font-size: 19px; }
.psa-note { font-size: 12.5px; color: #9a9a93; line-height: 1.65; margin-top: 12px; }

.psa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--psa-orange);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.psa-btn:hover { background: var(--psa-orange-h); }
.psa-btn.ghost { background: #fff; border-color: var(--psa-line); color: #44443e; }
.psa-btn.ghost:hover { border-color: var(--psa-orange); color: var(--psa-orange); background: #fff7f0; }
.psa-btn[disabled] { opacity: .6; cursor: not-allowed; }
.psa-btn + .psa-btn { margin-top: 9px; }

.psa-empty {
  background: #fff;
  border: 1px dashed var(--psa-line);
  border-radius: 14px;
  padding: 46px 20px;
  text-align: center;
}
.psa-empty svg { width: 54px; height: 54px; color: #d8d8d2; }
.psa-empty h3 { font-size: 17px; font-weight: 800; color: var(--psa-ink); margin: 12px 0 6px; }
.psa-empty p { font-size: 14px; color: var(--psa-gray); margin: 0 0 18px; line-height: 1.7; }

.psa-gate { text-align: center; padding: 60px 20px; }
.psa-gate h2 { font-size: 22px; font-weight: 800; color: var(--psa-ink); margin: 0 0 10px; }
.psa-gate p { font-size: 14.5px; color: var(--psa-gray); line-height: 1.75; margin: 0 auto 22px; max-width: 460px; }
.psa-gate .psa-btn { width: auto; min-width: 210px; margin: 0 auto; }

/* ---------- 6. 帮助中心 ---------- */
.psh-wrap { display: flex; gap: 26px; max-width: 1100px; margin: 0 auto; padding: 34px 18px 90px; align-items: flex-start; }
.psh-nav {
  flex: 0 0 232px;
  position: sticky;
  top: 86px;
  background: #fff;
  border: 1px solid var(--psa-line);
  border-radius: 14px;
  padding: 14px 10px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.psh-nav a {
  display: block;
  padding: 8px 10px;
  font-size: 13.5px;
  color: #4a4a44;
  text-decoration: none;
  border-radius: 8px;
  line-height: 1.45;
}
.psh-nav a:hover { background: #fff7f0; color: var(--psa-orange); }
.psh-nav .psh-grp {
  font-size: 12px;
  color: #a8a8a0;
  padding: 11px 10px 4px;
  letter-spacing: .05em;
}
.psh-body { flex: 1 1 auto; min-width: 0; }
.psh-sec {
  background: #fff;
  border: 1px solid var(--psa-line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
  scroll-margin-top: 90px;
}
.psh-sec h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--psa-ink);
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 2px solid #f4e6da;
}
.psh-sec h3 { font-size: 15.5px; font-weight: 700; color: #33332e; margin: 16px 0 6px; }
.psh-sec p,
.psh-sec li { font-size: 14px; line-height: 1.85; color: #44443e; }
/* 原站 Tailwind 的 preflight 把 ul/ol 的符号清了，这里补回来 */
.psh-sec ul,
.psa-card ul { list-style: disc outside; margin: 6px 0; padding-left: 22px; }
.psh-sec ol,
.psa-card ol { list-style: decimal outside; margin: 6px 0; padding-left: 24px; }
.psh-sec li,
.psa-card li { margin-bottom: 5px; display: list-item; }
.psh-sec ol > li::marker,
.psh-sec ul > li::marker { color: var(--psa-orange); font-weight: 700; }
.psh-sec a { color: var(--psa-orange); font-weight: 600; }
.psh-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 4px; }
.psh-tbl th { background: #2c5282; color: #fff; text-align: left; padding: 9px 10px; font-weight: 600; }
.psh-tbl td { padding: 9px 10px; border-bottom: 1px solid #ececE7; color: #44443e; }
.psh-tbl tr:nth-child(even) td { background: #f8f9fb; }
.psh-box {
  background: #fff8f2;
  border-left: 4px solid var(--psa-orange);
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #5a4636;
  margin: 12px 0;
}
.psh-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.psh-top a {
  font-size: 13.5px;
  padding: 8px 14px;
  border: 1px solid var(--psa-line);
  border-radius: 30px;
  background: #fff;
  color: #44443e;
  text-decoration: none;
}
.psh-top a:hover { border-color: var(--psa-orange); color: var(--psa-orange); }

/* ---------- 6.5 分屏页面的左右栏：原站 Tailwind 把 lg: 变体排在基础工具类之前，
   所以 `w-full lg:w-1/2` 实际会被后面的 `.w-full` 覆盖成 100%，
   导致注册/登录/忘记密码页的左右分栏不是各占一半。这里显式定死。 ---------- */
@media (min-width: 1024px) {
  div.min-h-screen.flex > div[class*="lg:w-1/2"] {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* ---------- 7. 顶栏 More 下拉 ---------- */
#psMoreMenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
  padding: 7px 0;
  min-width: 240px;
  z-index: 400;
  display: none;
  max-height: min(72vh, 540px);
  overflow: auto;
}
#psMoreMenu.on { display: block; }
#psMoreMenu a {
  display: block;
  padding: 9px 16px;
  font-size: 13.5px;
  color: #33332e;
  text-decoration: none;
  white-space: nowrap;
}
#psMoreMenu a:hover { background: #fff7f0; color: var(--psa-orange); }
#psMoreMenu .ps-grp {
  padding: 10px 16px 4px;
  font-size: 11.5px;
  color: #9a9a93;
  letter-spacing: .06em;
}
#psMoreMenu .ps-grp:first-child { padding-top: 4px; }

/* ---------- 8. 手机端 ---------- */
@media (max-width: 900px) {
  .psa-grid { flex-direction: column; }
  .psa-side { flex: 1 1 auto; width: 100%; }
  .psh-nav { display: none; }
  .psh-wrap { padding-top: 22px; }
  .psh-sec { padding: 17px 15px; }
}
@media (max-width: 767px) {
  .psa-page { padding: 20px 13px 80px; }
  .psa-title { font-size: 21px; }
  .psa-item { padding: 11px; gap: 11px; }
  .psa-item img { width: 64px; height: 64px; }
  .psa-item .psa-name { font-size: 14px; }
  .psa-qty button { width: 38px; height: 38px; }
  .psa-qty input { width: 46px; height: 38px; }
  .psa-price { font-size: 15px; width: 100%; margin-left: 0; }
  .psa-btn { padding: 13px 16px; }
  .psa-add { opacity: 1; width: 32px; height: 32px; }
  .psa-user .psa-mail { display: none; }
  .psh-sec h2 { font-size: 17px; }
  .psh-tbl { font-size: 12.5px; }
  .psh-tbl th,
  .psh-tbl td { padding: 7px 6px; }
}

/* ---------- 提交成功确认视图（提交后不再掉进「空车」） ---------- */
.psa-done { max-width: 760px; margin: 0 auto; }
.psa-done-ic {
  width: 62px; height: 62px; border-radius: 50%;
  background: #e8f7ee; color: #127a3d;
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0 14px;
}
.psa-done-ic svg { width: 34px; height: 34px; }
.psa-done h2 { margin: 0 0 6px; font-size: 25px; font-weight: 800; color: var(--psa-ink); }
.psa-done-sub { margin: 0 0 18px; font-size: 14px; color: var(--psa-gray); }
.psa-done-sub b {
  color: var(--psa-ink); font-weight: 800; letter-spacing: .04em;
  background: #fff7f0; border: 1px solid #ffd9bd; border-radius: 7px; padding: 2px 8px;
}
.psa-done-card { margin-bottom: 18px; }
.psa-dline {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0; border-bottom: 1px dashed var(--psa-line);
}
.psa-dline:last-of-type { border-bottom: 0; }
.psa-dline img {
  width: 46px; height: 46px; object-fit: contain;
  background: #f5f5f4; border-radius: 8px; flex-shrink: 0;
}
.psa-dname {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--psa-ink);
  line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.psa-dqty { font-size: 13px; color: var(--psa-gray); white-space: nowrap; }
.psa-dprice { font-size: 14.5px; font-weight: 800; color: var(--psa-ink); white-space: nowrap; }
.psa-dnote { max-width: 58%; text-align: right; font-weight: 600; word-break: break-word; }
.psa-next {
  background: #f7f8fa; border: 1px solid var(--psa-line);
  border-radius: 13px; padding: 16px 18px; margin-bottom: 18px;
}
.psa-next h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--psa-ink); }
.psa-next ol { list-style: decimal outside; margin: 0; padding-left: 22px; }
.psa-next li { font-size: 14px; line-height: 1.8; color: #44443e; margin-bottom: 5px; display: list-item; }
.psa-next li::marker { color: var(--psa-orange); font-weight: 700; }
.psa-done-btns { display: flex; gap: 11px; flex-wrap: wrap; }
.psa-done-btns .psa-btn { width: auto; min-width: 190px; margin: 0; }
.psa-done .psa-note { text-align: left; }
.psa-done .psa-note b { color: var(--psa-ink); }

/* ---------- 我的询价单（历史） ---------- */
.psa-sub2 { font-size: 13px; color: var(--psa-gray); margin: -6px 0 12px; line-height: 1.7; }
.psa-orow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 13px; border: 1px solid var(--psa-line); border-radius: 11px;
  margin-bottom: 9px; text-decoration: none; transition: border-color .2s, background .2s;
}
.psa-orow:hover { border-color: var(--psa-orange); background: #fff7f0; }
.psa-ono {
  font-size: 13.5px; font-weight: 800; color: var(--psa-ink);
  letter-spacing: .04em; white-space: nowrap;
}
.psa-ometa { flex: 1; min-width: 150px; font-size: 13px; color: #44443e; }
.psa-odate { font-size: 12.5px; color: #9a9a93; white-space: nowrap; }
.psa-ostate {
  font-size: 12px; font-weight: 700; color: #a35b00;
  background: #fff3e2; border-radius: 20px; padding: 3px 11px; white-space: nowrap;
}
@media (max-width: 767px) {
  .psa-done-ic { width: 52px; height: 52px; }
  .psa-done-ic svg { width: 28px; height: 28px; }
  .psa-done h2 { font-size: 21px; }
  .psa-done-btns .psa-btn { min-width: 0; width: 100%; }
  .psa-dline img { width: 42px; height: 42px; }
  .psa-dnote { max-width: 100%; text-align: left; }
  .psa-orow { gap: 8px; }
  .psa-ometa { min-width: 100%; order: 3; }
}
