* { box-sizing: border-box; }
body { margin: 0; background: #f1f5f9; font-family: system-ui, -apple-system, sans-serif; color: #0f172a; }
#app { max-width: 460px; margin: 0 auto; min-height: 100vh; padding-bottom: 90px; position: relative; }
.hidden { display: none !important; }

.toast {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: min(460px, 100%); z-index: 999; color: #fff;
  padding: 16px; font-size: 20px; font-weight: 900; text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

.header {
  position: sticky; top: 0; z-index: 150; background: #fff;
  border-bottom: 4px solid #1e40af; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.header-top { display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 28px; margin: 0; font-weight: 900; }
.domain { margin: 2px 0 0; font-size: 15px; color: #1e40af; font-weight: 900; }
.help-box {
  background: #fef2f2; border: 3px dashed #dc2626; padding: 12px;
  border-radius: 10px; font-size: 18px; font-weight: 900; color: #991b1b; line-height: 1.4;
}

.main { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.card { background: #fff; padding: 16px; border-radius: 16px; border: 3px solid #cbd5e1; }
.card-blue { border-color: #1e40af; }
.card-navy { border-color: #1e3a8a; }
.card-green { border-color: #047857; }
.card-dark { background: #1e3a8a; color: #fff; border-color: #facc15; }

h2 { font-size: 22px; font-weight: 900; margin: 0 0 12px 4px; }
h3 { font-size: 20px; font-weight: 900; margin: 0 0 12px; }

.btn {
  border: none; border-radius: 12px; font-size: 18px; font-weight: 900;
  padding: 12px 16px; cursor: pointer; font-family: inherit;
}
.btn-full { width: 100%; }
.btn-blue { background: #1e40af; color: #fff; }
.btn-navy { background: #1d4ed8; color: #fff; }
.btn-red { background: #dc2626; color: #fff; }
.btn-green { background: #16a34a; color: #fff; }
.btn-gray { background: #e2e8f0; color: #0f172a; }
.btn-user { background: #eff6ff; color: #1e40af; border: 2px solid #1e40af; padding: 8px 14px; }
.btn-link { background: none; border: none; color: #64748b; font-size: 16px; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 6px; }
.btn:disabled { background: #9ca3af; cursor: not-allowed; }

.input {
  width: 100%; padding: 12px; border: 3px solid #1e3a8a; border-radius: 12px;
  font-size: 18px; font-weight: 700; margin-bottom: 8px; font-family: inherit;
}
.label { font-size: 18px; font-weight: 900; color: #1e3a8a; display: block; margin: 6px 0 4px 4px; }

.quote-list { display: flex; flex-direction: column; gap: 10px; }
.quote-item { background: #fff; padding: 14px; border-radius: 16px; border: 3px solid #cbd5e1; }
.quote-item.active-cat { border-color: #1e40af; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-flex { display: flex; align-items: center; gap: 6px; }
.badge-time { font-size: 15px; font-weight: 900; color: #fff; padding: 3px 6px; border-radius: 4px; flex-shrink: 0; }
.price-num { font-size: 30px; font-weight: 900; color: #1e40af; }
.price-unit { font-size: 15px; font-weight: 700; color: #94a3b8; }
.cat-tag {
  font-size: 16px; font-weight: 900; padding: 3px 6px; border-radius: 4px;
  cursor: pointer; border: 1px solid rgba(15,23,42,0.15);
  text-decoration: underline; text-underline-offset: 2px;
}
.quote-footer {
  padding-top: 8px; margin-top: 8px; border-top: 2px dashed #e2e8f0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 8px;
}
.nick-btn {
  background: none; border: none; font-size: 18px; font-weight: 900;
  color: #1e40af; text-decoration: underline; cursor: pointer; padding: 0;
}
.sig-text {
  font-size: 12px; font-weight: 500; color: #a8b3c2; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #eff6ff; border: 2px solid #1e40af; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 15px; font-weight: 900; color: #1e40af;
}
.empty-box {
  background: #fff; padding: 16px; border-radius: 14px; border: 2px dashed #cbd5e1;
  text-align: center; font-size: 16px; font-weight: 800; color: #64748b;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(460px, 100%); background: #fff; border-top: 3px solid #cbd5e1;
  display: flex; justify-content: space-around; padding: 10px 0; z-index: 100;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08); transition: transform 0.25s ease-out;
}
.bottom-nav.hide { transform: translateX(-50%) translateY(100%); }
.bottom-nav button {
  background: none; border: none; font-size: 18px; font-weight: 700;
  color: #475569; cursor: pointer; padding: 8px 10px; border-radius: 8px;
}
.bottom-nav button.active {
  font-weight: 900; color: #1e40af; background: #dbeafe; border-bottom: 3px solid #1e40af;
}
/* ============================================================
   style_d.css —— 个人主页演示版样式（仅作用于 #profileDemo）
   与 style.css 共存；index.html 在 style.css 之后引入本文件。
   设计约束：手机端正文 ≥16px，价格 ≥26px，按钮高 ≥44px，字重 800-900。
   ============================================================ */

#profileDemo {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f1f5f9;
  padding-bottom: 90px;
  color: #0f172a;
}

/* ---------- 演示提示条 ---------- */
.pd-demo-tip {
  background: #fef9c3;
  border-bottom: 2px solid #facc15;
  color: #854d0e;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
  text-align: center;
}

/* ---------- 顶栏（返回 + 视角切换） ---------- */
.pd-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 3px solid #1e40af;
  padding: 10px 14px;
}
.pd-topbar__back {
  min-height: 44px;
  min-width: 44px;
  border: none;
  border-radius: 10px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.pd-topbar__title {
  flex: 1;
  text-align: center;
  font-size: 19px;
  font-weight: 900;
}

.pd-role-switch {
  display: flex;
  gap: 6px;
  background: #eff6ff;
  border-bottom: 2px solid #dbeafe;
  padding: 8px 14px;
}
.pd-role-switch button {
  flex: 1;
  min-height: 40px;
  border: 2px solid #1e40af;
  border-radius: 10px;
  background: #fff;
  color: #1e40af;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.pd-role-switch button.active {
  background: #1e40af;
  color: #fff;
}
.pd-role-switch button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ---------- 主体：手机单列，宽屏两列（左身份/介绍，右页签） ---------- */
.pd-wrap {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- 身份区 ---------- */
.pd-idcard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e3a8a;
  color: #fff;
  border: 3px solid #facc15;
  border-radius: 16px;
  padding: 14px;
}
.pd-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #facc15;
  color: #1e3a8a;
  font-size: 30px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
}
.pd-idcard__main {
  flex: 1;
  min-width: 0;
}
.pd-idcard__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-nick {
  font-size: 24px;
  font-weight: 900;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-occ {
  font-size: 13px;
  font-weight: 900;
  background: #facc15;
  color: #1e3a8a;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ---------- 通用按钮 ---------- */
.pd-btn {
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
  font-family: inherit;
}
.pd-btn--primary { background: #1e40af; color: #fff; }
.pd-btn--ghost   { background: rgba(255, 255, 255, .15); color: #fff; border: 2px solid rgba(255, 255, 255, .5); }
.pd-btn--green   { background: #16a34a; color: #fff; }
.pd-btn--red     { background: #dc2626; color: #fff; }
.pd-btn--block   { width: 100%; }
.pd-mini {
  min-height: 40px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
}
.pd-mini--green { background: #16a34a; color: #fff; }
.pd-mini--red   { background: #dc2626; color: #fff; }
.pd-mini--gray  { background: #e2e8f0; color: #0f172a; }
.pd-mini:disabled { background: #9ca3af; color: #fff; cursor: not-allowed; }


/* ---------- 页签（固定槽位） ---------- */
.pd-tabs {
  display: flex;
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
}
.pd-tabs button {
  flex: 1;
  min-height: 48px;
  border: none;
  background: #fff;
  color: #475569;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pd-tabs button + button { border-left: 2px solid #e2e8f0; }
.pd-tabs button.active {
  color: #1e40af;
  background: #eff6ff;
  box-shadow: inset 0 -4px 0 #1e40af;
}
.pd-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
}

/* ---------- 分段（收件箱 / 发件箱） ---------- */
.pd-seg {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.pd-seg button {
  flex: 1;
  min-height: 42px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}
.pd-seg button.active {
  border-color: #1e40af;
  background: #eff6ff;
  color: #1e40af;
}

/* ---------- 列表项 ---------- */
.pd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-item {
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
}
.pd-item--pending { border-color: #facc15; background: #fffbeb; }
.pd-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pd-item__who {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-item__tag {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #3730a3;
}
.pd-item__tag--send { background: #dcfce7; color: #166534; }
.pd-item__meta {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
}
.pd-item__qty {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 900;
  color: #1e40af;
}
.pd-item__acts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pd-item__acts .pd-mini { flex: 1; }

.pd-status {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
}
.pd-status--wait { background: #fef3c7; color: #92400e; }
.pd-status--deal { background: #dbeafe; color: #1e40af; }
.pd-status--no   { background: #fee2e2; color: #991b1b; }

.pd-card-person {
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
}
/* 头部：头像 + 昵称/身份 + 查看；宽屏一行，窄屏自动换行不挤压 */
.pd-card-person__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

/* ---------- 个人介绍（签名唯一展示处） ---------- */
.pd-intro {
  background: #fff;
  border: 2px solid #cbd5e1;
  border-left: 6px solid #1e40af;
  border-radius: 14px;
  padding: 10px 12px;
}
.pd-intro__title {
  font-size: 14px;
  font-weight: 900;
  color: #1e3a8a;
  margin: 0 0 6px;
}
.pd-intro__text {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  color: #0f172a;
  word-break: break-word;
}
.pd-intro__empty {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
}

/* 名片里的联系方式：手机 + 微信，一行放不下就各占一行 */
.pd-card-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 15px;
  font-weight: 800;
  color: #1e40af;
}
.pd-card-contact__line {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 对方没递名片：灰底虚线的锁定条，下面小字说明「对方看得到我」 */
.pd-card-contact--locked {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  color: #64748b;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}
.pd-card-contact small {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
}

/* 名片三栏：互换 / 单向递来 / 我递出的 —— 手机换成两行两列，标签完整显示 */
.pd-seg--three { gap: 6px; flex-wrap: wrap; }
.pd-seg--three button {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  font-size: 15px;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.25;
}
/* 极窄屏（≤340px）联系方式一律上下排，避免两列挤成一条竖向字 */
@media (max-width: 340px) {
  .pd-card-contact__line { flex: 1 1 100%; }
}
.pd-card-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
}
.pd-card-tag--swap { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.pd-card-tag--in   { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.pd-card-tag--out  { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }

/* ---------- 空态 ---------- */
.pd-empty {
  text-align: center;
  padding: 26px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 800;
}
/* ---------- 编辑资料：底部弹层 ---------- */
.pd-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, .45);
}
.pd-sheet {
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
.pd-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pd-sheet__title { font-size: 20px; font-weight: 900; margin: 0; }
.pd-field { margin-bottom: 12px; }
.pd-field label {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #1e3a8a;
  margin-bottom: 6px;
}
.pd-field input,
.pd-field select {
  width: 100%;
  min-height: 48px;
  border: 2px solid #1e3a8a;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
}

/* ---------- 宽屏（电脑） ---------- */
@media (min-width: 768px) {
  #profileDemo { max-width: 1000px; }
  .pd-wrap {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    align-items: start;
    padding: 16px 24px;
  }
  .pd-side { position: sticky; top: 72px; }
  .pd-main { min-width: 0; }
}


