/* =========================
   Drawer (FINAL - SINGLE SOURCE OF TRUTH)
   ========================= */

.no-scroll {
  overflow: hidden;
}

/* overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  z-index: 10001;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* drawer panel */
.drawer {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 300px;

  /* ✅ 更明显的品牌暖黄渐变（对比拉开） */
  background: linear-gradient(180deg,
      #ffe08a 0%,
      #ffefbf 14%,
      #fff6de 32%,
      #f6f7f8 62%,
      #f2f4f6 100%);

  /* ⭐ 关键：只圆右边 */
  border-radius: 0 22px 22px 0;

  /* ✅ 让边界更立体：外阴影 + 内阴影（层次立刻出来） */
  box-shadow:
    14px 0 34px rgba(0, 0, 0, .16),
    inset -1px 0 0 rgba(255, 255, 255, .55),
    inset 0 1px 0 rgba(255, 255, 255, .40);

  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.2, .9, .15, 1);
  display: flex;
  flex-direction: column;
  will-change: transform;
  overflow: hidden;
}

.drawer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .06));
  pointer-events: none;
}

.drawer-overlay.active .drawer {
  transform: translateX(0);
}

/* 顶部：更明显的品牌黄条（你说太小 => 改 16px） */
.drawer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0px;
  /* ✅ 原来 12px 太细，这里加粗 */
  background: linear-gradient(90deg,
      rgba(240, 196, 60, 1),
      rgba(245, 215, 110, 1));
  z-index: 2;
}

/* topbar */
.drawer-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  padding-top: 26px;
  /* ✅ 给 16px 黄条让位（比黄条高一点更舒服） */
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  z-index: 1;
}

/* brand logo */
.drawer-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.drawer-logo {
  height: 28px;
  width: auto;
  display: block;
}

/* close button */
.drawer-x {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  transition: background .15s ease, transform .15s ease;
}

.drawer-x:hover {
  background: rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

/* card */
.drawer-card {
  margin: 12px 14px 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
  overflow: hidden;
}

/* user row */
.drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
}

/* avatar */
.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .4px;
  user-select: none;
  background:
    radial-gradient(120% 120% at 30% 20%,
      rgba(255, 255, 255, .35),
      rgba(255, 255, 255, 0) 40%),
    linear-gradient(135deg,
      rgba(240, 196, 60, 1),
      rgba(255, 155, 55, .95),
      rgba(255, 120, 120, .9));
  box-shadow: 0 10px 22px rgba(240, 196, 60, .22);
}

/* account */
.drawer-account {
  flex: 1;
  font-weight: 800;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* optional arrow button */
.drawer-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, .06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: background .15s ease, transform .15s ease;
}

.drawer-arrow:hover {
  background: rgba(240, 196, 60, .30);
  transform: translateY(-1px);
}

/* divider */
.drawer-divider {
  height: 1px;
  background: rgba(0, 0, 0, .08);
  margin: 0 14px;
}

/* nav */
.drawer-nav {
  padding: 10px 8px 14px;
  overflow: auto;
}

/* item */
.drawer-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  margin: 4px 6px;
  border-radius: 12px;
  text-decoration: none;
  color: #222;
  background: transparent;
  transition: transform .18s ease, box-shadow .18s ease;
}

/* hover 铺底 */
.drawer-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(240, 195, 60);
  /* hover 黄底 */
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .40s cubic-bezier(.16, .84, .22, 1);
  z-index: 0;
}

.drawer-item>* {
  position: relative;
  z-index: 1;
}

.drawer-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(240, 196, 60, .16);
}

.drawer-item:hover::before {
  transform: scaleX(1);
}

/* icon */
.drawer-ico {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease;
}

.drawer-item:hover .drawer-ico {
  transform: translateY(-1px);
}

.drawer-txt {
  font-weight: 700;
}

.drawer-item:hover .drawer-txt {
  font-weight: 800;
}

/* ✅ active：开始生成报告需要“黄底 + 左侧黄条” */
.drawer-item.is-active {
  background: transparent;
  box-shadow: none;
  font-weight: 800;
}



/* active：左侧黄条 */
.drawer-item.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(240, 196, 60, .95);
  z-index: 2;
}

/* button 版本兼容 */
.drawer-item.drawer-item-btn {
  border: 0;
  width: calc(100% - 12px);
  text-align: left;
  cursor: pointer;
}

/* ===== Drawer logout icon (rounded pill) ===== */
.drawer-logouticon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgb(234, 231, 226);
  padding: 0 10px;
  /* 让胶囊更有呼吸感 */
  color: rgb(110, 82, 17);
  /* ✅ 箭头颜色 */

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.drawer-logouticon:hover {
  background: rgba(240, 196, 60, 0.28);
  box-shadow: 0 10px 22px rgba(240, 196, 60, 0.18);
  transform: translateY(-1px);
}

.drawer-logouticon:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(240, 196, 60, 0.14);
}

.drawer-logouticon svg {
  display: block;
}

.drawer-ico {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, .06);

  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;

  flex-shrink: 0;
  transition: transform .18s ease, background-color .18s ease;
}

/* 开始生成报告（星星那个） */
.drawer-item[data-key="report"] .drawer-ico {
  background-image: url("/assets/icons/icon_report.png");
}

/* 我生成过的报告（列表） */
.drawer-item[data-key="list"] .drawer-ico {
  background-image: url("/assets/icons/icon_list.png");
}

/* 更新个人信息（锁） */
.drawer-item[data-key="lock"] .drawer-ico {
  background-image: url("/assets/icons/icon_info.png");
}

/* 关于有禧（房子 / 信息） */
.drawer-item[data-key="info"] .drawer-ico {
  background-image: url("/assets/icons/icon_abort.png");
}

/* 联系我们（电话） */
.drawer-item[data-key="phone"] .drawer-ico {
  background-image: url("/assets/icons/icon_content.png");
}

.drawer-item:hover .drawer-ico,
.drawer-item.is-active .drawer-ico {
  background-color: rgba(255, 255, 255, .45);
}

/* =========================
   Drawer - Mobile Boost (<=600px)
   只增强手机端对比度，不影响桌面
   ========================= */
@media (max-width: 600px) {

  /* 抽屉底色更“黄”更有层次 */
  .drawer {
    background: linear-gradient(180deg,
        #ffd36a 0%,
        #ffe7a8 16%,
        #fff3d6 38%,
        #f4f6f8 72%,
        #eef2f5 100%);

    /* 手机端圆角再圆一点更舒服 */
    border-radius: 0 26px 26px 0;

    /* 边界更强：阴影更深 + 内高光更明显 */
    box-shadow:
      18px 0 46px rgba(0, 0, 0, .22),
      inset -2px 0 0 rgba(255, 255, 255, .70),
      inset 0 1px 0 rgba(255, 255, 255, .55);
  }

  /* 右侧“亮边”加粗，让抽屉和背景明确分层 */
  .drawer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    /* ✅ 手机上更粗 */
    height: 100%;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, .10));
    pointer-events: none;
  }

  /* 顶部黄条更明显 */
  .drawer::before {
    height: 18px;
    background: linear-gradient(90deg,
        rgba(240, 196, 60, 1),
        rgba(255, 230, 150, 1));
  }
}

.drawer-ico img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

/* =========================
   Reports Page (历史报告页)
   ========================= */