/*
 * 帮贷看 conversation shell v3.
 * A calm AI-chat workspace: light history rail, one central conversation and
 * one bottom composer. Financial facts and reports open in a side drawer.
 */
body.bangdaikan-app {
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  color: #1f2329;
}

.bangdaikan-app #authenticatedApp:not([hidden]) {
  height: 100dvh;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
}

.bangdaikan-app .app-header {
  position: relative;
  top: auto;
  z-index: 60;
  height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid #ececef;
  background: rgba(255, 255, 255, .97);
  color: #22252a;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.bangdaikan-app .brand-block { gap: 10px; }

.bangdaikan-app .brand-mark {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #287ce8, #1263d6);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 99, 214, .18);
  font-size: 15px;
}

.bangdaikan-app .brand-name {
  color: #22252a;
  font-size: 15px;
  letter-spacing: 0;
}

.bangdaikan-app .brand-meta {
  color: #92969d;
  font-size: 9px;
}

.bangdaikan-app .header-trust { gap: 8px; }

.bangdaikan-app .header-case-action {
  position: relative;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #5c6067;
  cursor: pointer;
}

.bangdaikan-app .header-case-action:hover,
.bangdaikan-app .header-case-action[aria-expanded="true"] {
  background: #f3f3f4;
  color: #24282e;
}

.bangdaikan-app .header-case-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bangdaikan-app .header-case-action > span,
.bangdaikan-app .header-case-action > b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bangdaikan-app .header-report-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #dedfe2;
  border-radius: 9px;
  background: #fff;
  color: #565a61;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.bangdaikan-app .header-report-action:hover {
  border-color: #c9d6e4;
  background: #f5f7f9;
  color: #1f4f7d;
}

.bangdaikan-app .account-menu {
  min-height: 30px;
  padding-left: 10px;
  border-left-color: #e4e6e9;
  color: #62666d;
}

.bangdaikan-app .account-menu button {
  min-height: 28px;
  border-color: #dedfe2;
  background: #fff;
  color: #565a61;
}

.bangdaikan-app .account-menu button:hover { background: #f4f4f5; }

.bangdaikan-app .app-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.bangdaikan-app .side-nav.consultation-history-nav {
  position: relative;
  top: auto;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  gap: 8px;
  padding: 14px 10px 16px;
  overflow: hidden;
  border-right: 1px solid #ececef;
  background: #f7f7f8;
  color: #2b2f35;
}

.bangdaikan-app .new-consultation-button {
  min-height: 42px;
  justify-content: flex-start;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  color: #24282e;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.bangdaikan-app .new-consultation-button:hover {
  border-color: #e2e3e6;
  background: #fff;
}

.bangdaikan-app .new-consultation-button span {
  color: #4e535a;
  font-size: 18px;
  font-weight: 500;
}

.bangdaikan-app .consultation-history-label {
  padding: 12px 10px 4px;
  color: #a0a3a9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}

.bangdaikan-app .consultation-history-list {
  gap: 3px;
  padding: 0;
  scrollbar-color: #d8dade transparent;
}

.bangdaikan-app .consultation-history-item,
.bangdaikan-app .consultation-history-item:hover,
.bangdaikan-app .consultation-history-item.is-last-opened,
.bangdaikan-app .consultation-history-item.is-active {
  min-height: 66px;
  grid-template-rows: 17px 14px 13px;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #454950;
  box-shadow: none;
}

.bangdaikan-app .consultation-history-item:hover,
.bangdaikan-app .consultation-history-item.is-last-opened { background: #efeff1; }
.bangdaikan-app .consultation-history-item.is-active { background: #e7e7ea; }

.bangdaikan-app .consultation-history-item-title {
  color: #34383e;
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
}

.bangdaikan-app .consultation-history-item-meta,
.bangdaikan-app .consultation-history-item small {
  color: #9a9da3;
  font-size: 9px;
}

.bangdaikan-app .consultation-history-item-meta { line-height: 14px; }
.bangdaikan-app .consultation-history-item small { line-height: 13px; }

.bangdaikan-app .consultation-history-nav .case-directory-loading,
.bangdaikan-app .consultation-history-nav .case-directory-empty {
  padding: 14px 10px;
  border-color: #dadce0;
  background: transparent;
  color: #898d94;
}

.bangdaikan-app .consultation-history-nav .case-directory-empty strong { color: #4c5056; }
.bangdaikan-app .consultation-history-nav .case-directory-empty p { color: #989ba1; }

.bangdaikan-app .main-content {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.bangdaikan-app .main-content > #view-intake,
.bangdaikan-app #view-intake.is-active {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.bangdaikan-app #activeCaseJourney.interview-layout {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.bangdaikan-app #activeCaseJourney .interview-workspace {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.bangdaikan-app #activeCaseJourney .interview-scroll-region {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bangdaikan-app #activeCaseJourney .interview-messages {
  width: min(820px, 100%);
  gap: 18px;
  padding: 28px 24px 12px;
}

.bangdaikan-app #activeCaseJourney .interview-suggestions {
  width: min(820px, 100%);
  padding-right: 24px;
  padding-bottom: 16px;
}

.bangdaikan-app #activeCaseJourney #interviewNotice {
  position: relative;
  width: fit-content;
  max-width: min(720px, calc(100% - 48px));
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 24px 12px max(24px, calc((100% - 820px) / 2 + 24px));
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid #cfe6db;
  border-left-width: 1px;
  border-radius: 10px;
  background: #f1faf6;
  color: #176343;
  box-shadow: 0 5px 16px rgba(20, 92, 61, .08);
  font-size: 13px;
  line-height: 1.45;
}

.bangdaikan-app #activeCaseJourney #interviewNotice::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(23, 99, 67, .1);
  content: "";
}

.bangdaikan-app #activeCaseJourney #interviewNotice:not(.is-success):not(.is-error) {
  border-color: #d6e5f7;
  background: #f4f8fd;
  color: #2f5f92;
  box-shadow: 0 5px 16px rgba(47, 95, 146, .07);
}

.bangdaikan-app #activeCaseJourney #interviewNotice.is-error {
  border-color: #f0d2cf;
  background: #fff6f5;
  color: #9b3832;
  box-shadow: 0 5px 16px rgba(155, 56, 50, .07);
}

.bangdaikan-app #activeCaseJourney #interviewNotice.is-entering {
  animation: interviewNoticeEnter .24s cubic-bezier(.2, .75, .25, 1) both;
}

.bangdaikan-app #activeCaseJourney #interviewNotice.is-leaving {
  pointer-events: none;
  animation: interviewNoticeLeave .22s ease both;
}

.bangdaikan-app #activeCaseJourney #interviewNotice.is-transient::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: .16;
  transform-origin: left center;
  animation: interviewNoticeCountdown 4.2s linear both;
  content: "";
}

@keyframes interviewNoticeEnter {
  from { opacity: 0; transform: translateY(7px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes interviewNoticeLeave {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-5px); }
}

@keyframes interviewNoticeCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .bangdaikan-app #activeCaseJourney #interviewNotice.is-entering,
  .bangdaikan-app #activeCaseJourney #interviewNotice.is-leaving,
  .bangdaikan-app #activeCaseJourney #interviewNotice.is-transient::after {
    animation: none;
  }
}

@media (max-width: 620px) {
  .bangdaikan-app #activeCaseJourney #interviewNotice {
    max-width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
  }
}

.bangdaikan-app #activeCaseJourney .suggestion-button {
  border-color: #e0e1e4;
  background: #f7f7f8;
  color: #454950;
  box-shadow: none;
}

.bangdaikan-app #activeCaseJourney .suggestion-button:hover {
  border-color: #d5d7da;
  background: #f0f0f2;
}

.bangdaikan-app #activeCaseJourney .message-avatar {
  background: linear-gradient(145deg, #2b7de9, #1765d3);
  box-shadow: none;
}

.bangdaikan-app #activeCaseJourney .message-body {
  border-color: #ececef;
  background: #fff;
  color: #30343a;
  box-shadow: none;
}

.bangdaikan-app #activeCaseJourney .interview-message.is-user .message-body {
  border-color: transparent;
  background: #f0f1f3;
  color: #272a30;
}

.bangdaikan-app #activeCaseJourney .interview-composer-dock {
  position: static;
  align-self: end;
  padding: 10px 24px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 18px, #fff 100%);
}

.bangdaikan-app #activeCaseJourney .interview-composer {
  width: min(820px, 100%);
  gap: 6px 8px;
  padding: 9px 10px 8px;
  border: 1px solid #dedfe2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(24, 28, 34, .09);
}

.bangdaikan-app #activeCaseJourney .interview-composer textarea {
  min-height: 44px;
  padding: 11px 13px;
  background: transparent;
  color: #2b2f35;
}

.bangdaikan-app #activeCaseJourney .interview-composer .button {
  min-width: 66px;
  min-height: 42px;
  border-radius: 14px;
  background: #1f73e8;
  box-shadow: none;
}

.bangdaikan-app #activeCaseJourney .composer-tool-button {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  justify-content: flex-start;
  white-space: nowrap;
  border-radius: 8px;
  color: #666b73;
}

.bangdaikan-app #activeCaseJourney .composer-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.bangdaikan-app #activeCaseJourney .composer-tools::-webkit-scrollbar { display: none; }

.bangdaikan-app #activeCaseJourney .composer-tool-button.is-report-action {
  color: #1768d7;
  font-weight: 650;
}

.bangdaikan-app #activeCaseJourney .composer-tool-button:hover {
  background: #f4f4f5;
  color: #25292f;
}

.bangdaikan-app #activeCaseJourney .composer-hint {
  color: #a0a3a9;
  text-align: center;
}

.bangdaikan-app #interviewSidebar.interview-sidebar {
  position: fixed;
  top: 58px;
  right: 0;
  bottom: 0;
  z-index: 92;
  width: min(380px, 92vw);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #e6e7e9;
  background: #fff;
  box-shadow: -16px 0 44px rgba(23, 28, 35, .12);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease, visibility 0s linear .22s;
}

.bangdaikan-app #interviewSidebar.interview-sidebar.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .22s ease;
}

.bangdaikan-app .interview-sidebar-drawer-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 11px 18px;
  border-bottom: 1px solid #eceef1;
  background: rgba(255, 255, 255, .97);
}

.bangdaikan-app .interview-sidebar-drawer-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bangdaikan-app .interview-sidebar-drawer-heading span {
  color: #9a9da3;
  font-size: 10px;
}

.bangdaikan-app .interview-sidebar-drawer-heading strong {
  color: #2b2f35;
  font-size: 15px;
}

.bangdaikan-app .interview-sidebar-drawer-heading button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 9px;
  background: #f4f4f5;
  color: #63676e;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.bangdaikan-app .interview-sidebar-drawer-heading button:hover {
  background: #e9e9eb;
  color: #24282e;
}

.bangdaikan-app #interviewSidebarBackdrop.interview-sidebar-backdrop {
  position: fixed;
  inset: 58px 0 0;
  z-index: 91;
  display: block;
  border: 0;
  background: rgba(25, 28, 33, .24);
  backdrop-filter: blur(1px);
}

.bangdaikan-app #interviewSidebarBackdrop.interview-sidebar-backdrop[hidden] { display: none; }
body.has-interview-sidebar-open { overflow: hidden; }

/* Wide screens do not spend a full row on an otherwise empty top bar. */
@media (min-width: 1500px) {
  .bangdaikan-app #authenticatedApp:not([hidden]) {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
  }

  .bangdaikan-app .app-header {
    position: absolute;
    inset: 0;
    height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    overflow: visible;
    pointer-events: none;
  }

  .bangdaikan-app .brand-block {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 61;
    pointer-events: auto;
  }

  .bangdaikan-app .header-trust {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 61;
    min-height: 40px;
    padding: 3px 5px;
    border: 1px solid #ececef;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 16px rgba(24, 28, 34, .06);
    backdrop-filter: blur(12px);
    pointer-events: auto;
  }

  .bangdaikan-app .app-shell {
    grid-row: 1;
    height: 100%;
  }

  .bangdaikan-app .side-nav.consultation-history-nav {
    padding-top: 58px;
    padding-bottom: 16px;
  }

  .bangdaikan-app #interviewSidebar.interview-sidebar { top: 0; }
  .bangdaikan-app #interviewSidebarBackdrop.interview-sidebar-backdrop { inset: 0; }
}

@media (min-width: 901px) and (max-width: 1160px) {
  .bangdaikan-app .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .bangdaikan-app #authenticatedApp:not([hidden]) {
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .bangdaikan-app .app-header {
    height: 54px;
    padding: 0 12px;
  }

  .bangdaikan-app .brand-meta,
  .bangdaikan-app .account-menu > span { display: none; }

  .bangdaikan-app .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .bangdaikan-app .side-nav.consultation-history-nav {
    height: 100%;
    min-height: 0;
    max-height: none;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 8px 14px;
    overflow: hidden;
    border-right: 1px solid #ececef;
    border-bottom: 0;
    background: #fafafa;
  }

  .bangdaikan-app .new-consultation-button {
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
  }

  .bangdaikan-app .consultation-history-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .bangdaikan-app .consultation-history-item {
    width: auto;
    min-height: 66px;
    flex: 0 0 auto;
    padding: 8px 9px;
  }

  .bangdaikan-app #interviewSidebar.interview-sidebar {
    top: 54px;
    width: min(380px, 94vw);
  }

  .bangdaikan-app #interviewSidebarBackdrop.interview-sidebar-backdrop { inset: 54px 0 0; }
}

@media (max-width: 620px) {
  .bangdaikan-app .app-header { padding: 0 8px; }
  .bangdaikan-app .brand-block > div:last-child { display: none; }
  .bangdaikan-app .header-trust { gap: 5px; }
  .bangdaikan-app .header-report-action {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }
  .bangdaikan-app .account-menu { padding-left: 5px; }

  .bangdaikan-app .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px minmax(0, 1fr);
  }

  .bangdaikan-app .side-nav.consultation-history-nav {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    max-width: 100%;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 6px;
    padding: 4px 6px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid #ececef;
  }

  .bangdaikan-app .consultation-history-list {
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .bangdaikan-app .consultation-history-item {
    width: 150px;
    min-height: 40px;
    flex: 0 0 150px;
    grid-template-rows: 17px;
    align-content: center;
    justify-content: center;
    padding: 6px 9px;
  }

  .bangdaikan-app .consultation-history-item-meta,
  .bangdaikan-app .consultation-history-item small {
    display: none;
  }

  .bangdaikan-app #activeCaseJourney .interview-messages {
    gap: 15px;
    padding: 18px 12px 8px;
  }

  .bangdaikan-app #activeCaseJourney .interview-composer-dock {
    padding: 7px 9px calc(9px + env(safe-area-inset-bottom));
  }

  .bangdaikan-app #activeCaseJourney .interview-composer {
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(24, 28, 34, .1);
  }

  .bangdaikan-app #activeCaseJourney .composer-hint { display: none; }

  .bangdaikan-app #interviewSidebar.interview-sidebar {
    top: 0;
    width: 100vw;
    max-width: none;
  }

  .bangdaikan-app #interviewSidebarBackdrop.interview-sidebar-backdrop { inset: 0; }
}
