/* ========================================
   phone-wallet.css - 查手机钱包页面样式
   角色视角的钱包：余额卡 + 收支账单列表 + 账单详情
   奶白底 + 深色质感余额卡，高级简约
   ======================================== */

/* ====== 全屏容器 ====== */
.pwl-screen {
  position: absolute;
  inset: 0;
  max-width: 100%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .32s ease, visibility .32s;
  overflow: hidden;
  overflow-x: hidden;
  box-sizing: border-box;
}
.pwl-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ====== 列表视图 ====== */
.pwl-list-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: transform .3s ease;
  will-change: transform;
}
.pwl-list-view.is-hidden {
  transform: translateX(-24%);
}

/* ====== 顶部导航栏 ====== */
.pwl-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.pwl-nav__back,
.pwl-nav__action {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #5a564e;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.pwl-nav__back:active,
.pwl-nav__action:active {
  background: rgba(0, 0, 0, .06);
}
.pwl-nav__back svg,
.pwl-nav__action svg {
  width: 22px;
  height: 22px;
}
.pwl-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #3a372f;
  letter-spacing: .5px;
}
.pwl-nav__right {
  display: flex;
  align-items: center;
}

/* ====== 角色身份提示条 ====== */
.pwl-owner-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 6px;
}
.pwl-owner-bar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d8d2c6;
  color: #6a655b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.pwl-owner-bar__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pwl-owner-bar__info {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.pwl-owner-bar__name {
  font-size: 15px;
  font-weight: 600;
  color: #3a372f;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pwl-owner-bar__hint {
  font-size: 13px;
  color: #9a958a;
}

/* ====== 余额卡片 ====== */
.pwl-balance-card {
  flex-shrink: 0;
  margin: 8px 16px 4px;
  padding: 20px 22px 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, #3d3a33 0%, #544f45 55%, #6b6354 100%);
  color: #f3f1ec;
  box-shadow: 0 10px 26px rgba(60, 55, 45, .28);
  position: relative;
  overflow: hidden;
}
.pwl-balance-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.pwl-balance-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.pwl-balance-card__label {
  font-size: 12.5px;
  color: rgba(243, 241, 236, .7);
  letter-spacing: .5px;
}
.pwl-balance-card__bank {
  font-size: 12px;
  color: rgba(243, 241, 236, .85);
  padding: 3px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .12);
}
.pwl-balance-card__amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 10px 0 16px;
  position: relative;
  z-index: 1;
}
.pwl-balance-card__sub {
  display: flex;
  gap: 28px;
  position: relative;
  z-index: 1;
}
.pwl-balance-card__stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pwl-balance-card__stat-label {
  font-size: 11.5px;
  color: rgba(243, 241, 236, .6);
}
.pwl-balance-card__stat-val {
  font-size: 15px;
  font-weight: 600;
}
.pwl-balance-card__stat-val.is-income {
  color: #a9d6b0;
}
.pwl-balance-card__stat-val.is-expense {
  color: #e8b6a6;
}

/* ====== 列表主体（可滚动） ====== */
.pwl-list-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 16px 28px;
}
.pwl-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #8a8478;
  letter-spacing: .5px;
  padding: 14px 4px 8px;
}

/* ====== 账单列表 ====== */
.pwl-bills {
  background: #fbfaf8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
  border: 1px solid rgba(0, 0, 0, .03);
}
.pwl-bill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  transition: background .16s ease;
}
.pwl-bill:last-child {
  border-bottom: none;
}
.pwl-bill:active {
  background: rgba(0, 0, 0, .03);
}
.pwl-bill__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pwl-bill__icon svg {
  width: 20px;
  height: 20px;
}
.pwl-bill__icon--out {
  background: #f0ebe3;
  color: #8a8074;
}
.pwl-bill__icon--in {
  background: #e4efe6;
  color: #6fa078;
}
.pwl-bill__main {
  flex: 1;
  min-width: 0;
}
.pwl-bill__title {
  font-size: 14.5px;
  font-weight: 500;
  color: #3a372f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pwl-bill__sub {
  font-size: 11.5px;
  color: #a8a297;
  margin-top: 3px;
}
.pwl-bill__amount {
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: .3px;
}
.pwl-bill__amount.is-income {
  color: #6fa078;
}
.pwl-bill__amount.is-expense {
  color: #4a463e;
}

/* ====== 加载状态 ====== */
.pwl-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  gap: 14px;
}
.pwl-loading.is-hidden {
  display: none;
}
.pwl-loading__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, .08);
  border-top-color: #b0a99a;
  border-radius: 50%;
  animation: pwlSpin .8s linear infinite;
}
@keyframes pwlSpin {
  to { transform: rotate(360deg); }
}
.pwl-loading__text {
  font-size: 13px;
  color: #9a958a;
}

/* ====== 空状态 ====== */
.pwl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  gap: 10px;
  text-align: center;
}
.pwl-empty__icon {
  width: 50px;
  height: 50px;
  color: #cac4b8;
}
.pwl-empty__text {
  font-size: 15px;
  font-weight: 600;
  color: #7a756b;
}
.pwl-empty__hint {
  font-size: 12.5px;
  color: #a8a297;
}

/* ====== 账单详情视图 ====== */
.pwl-detail-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s ease, visibility .3s;
  will-change: transform;
}
.pwl-detail-view.is-active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
.pwl-detail-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.pwl-detail-nav__back {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #5a564e;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.pwl-detail-nav__back:active {
  background: rgba(0, 0, 0, .06);
}
.pwl-detail-nav__back svg {
  width: 22px;
  height: 22px;
}
.pwl-detail-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #3a372f;
}
.pwl-detail-nav__right {
  width: 38px;
}

/* 详情主体 */
.pwl-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 20px 30px;
}

/* 金额大字 */
.pwl-detail-amount-wrap {
  text-align: center;
  margin-bottom: 24px;
}
.pwl-detail-amount {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #4a463e;
}
.pwl-detail-amount.is-income {
  color: #6fa078;
}
.pwl-detail-amount.is-expense {
  color: #4a463e;
}
.pwl-detail-amount-label {
  font-size: 13px;
  color: #a8a297;
  margin-top: 6px;
}

/* 交易方 */
.pwl-detail-party {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #3a372f;
  margin-bottom: 22px;
  word-break: break-word;
}

/* 信息网格 */
.pwl-detail-info {
  background: #fbfaf8;
  border-radius: 14px;
  padding: 4px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
  border: 1px solid rgba(0, 0, 0, .03);
  margin-bottom: 18px;
}
.pwl-detail-info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.pwl-detail-info__row:last-child {
  border-bottom: none;
}
.pwl-detail-info__label {
  font-size: 13.5px;
  color: #9a958a;
}
.pwl-detail-info__val {
  font-size: 13.5px;
  color: #3a372f;
  font-weight: 500;
  max-width: 60%;
  text-align: right;
  word-break: break-word;
}

/* 备注/心境 */
.pwl-detail-note-wrap {
  background: #fbfaf8;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
  border: 1px solid rgba(0, 0, 0, .03);
}
.pwl-detail-note-label {
  font-size: 12px;
  font-weight: 600;
  color: #a8a297;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.pwl-detail-note {
  font-size: 14.5px;
  line-height: 1.7;
  color: #4a463e;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 底部只读提示 */
.pwl-detail-footer {
  flex-shrink: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, .04);
  background: rgba(255, 255, 255, .9);
}
.pwl-detail-footer__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #a8a297;
}

/* ====== Toast ====== */
.pwl-toast {
  position: absolute;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(58, 55, 47, .92);
  color: #f3f1ec;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 100;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}
.pwl-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
