:root {
  --primary: #13bfa6;
  --primary-dark: #0a8f86;
  --secondary: #ff6b5f;
  --accent: #f4b740;
  --nav: #181818;
  --page-bg: #f4f6f8;
  --text: #20242a;
  --muted: #8b949e;
  --line: #e7ebef;
  --panel: #ffffff;
  --shadow: 0 10px 28px rgba(23, 34, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.topbar {
  height: 45px;
  background: var(--nav);
  color: #fff;
}

.topbar-inner {
  width: min(1180px, calc(100vw - 72px));
  height: 45px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-chip {
  align-self: stretch;
  min-width: 84px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
}

.manager-link {
  opacity: 0.95;
}

.top-user {
  font-weight: 700;
  font-size: 11px;
}

.caret {
  margin-left: -18px;
  font-size: 11px;
}

.app-shell {
  width: min(1180px, calc(100vw - 72px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 12px;
  align-items: start;
}

.main-panel {
  min-height: calc(100vh - 68px);
  background: var(--panel);
  border: 1px solid #f0f1f2;
}

.main-section {
  min-height: 820px;
}

.section-title {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 800;
}

.section-title::before {
  content: "";
  width: 2px;
  height: 18px;
  margin-right: 10px;
  background: var(--secondary);
}

.content-pad {
  padding: 20px 32px 48px;
}

.tabs-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-row::-webkit-scrollbar {
  display: none;
}

.tab-button {
  position: relative;
  min-width: 92px;
  height: 42px;
  border: 0;
  border-right: 1px solid #edf0f3;
  background: transparent;
  color: #111827;
  font-size: 16px;
  white-space: nowrap;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button.is-active {
  font-weight: 800;
}

.tab-button.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 4px;
  border-radius: 3px;
  background: #0e1324;
  transform: translateX(-50%);
}

.empty-wrap {
  min-height: 440px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-block img {
  width: 170px;
  height: auto;
  display: block;
}

.empty-block.is-small img {
  width: 118px;
}

.week-shell {
  margin-top: 16px;
  border: 1px solid #d9dee4;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  height: 88px;
}

.week-arrow {
  border: 0;
  background: #fff;
  border-right: 1px solid #d9dee4;
  color: #0f172a;
  display: grid;
  place-items: center;
}

.week-arrow:last-child {
  border-right: 0;
  border-left: 1px solid #d9dee4;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  overflow: hidden;
}

.day-cell {
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: center;
  border-right: 1px solid #edf0f3;
  font-size: 13px;
}

.day-cell:last-child {
  border-right: 0;
}

.day-cell strong {
  font-weight: 500;
}

.day-cell.is-today {
  background: var(--secondary);
  color: #fff;
}

.subsection-title {
  min-height: 48px;
  margin: 20px -32px 0;
  padding: 0 32px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  font-weight: 800;
}

.subsection-title::before {
  content: "";
  width: 2px;
  height: 18px;
  margin-right: 10px;
  background: var(--secondary);
}

.indicator-tabs {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 46px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 0 2px;
}

.indicator-tabs button {
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.indicator-tabs button.is-active {
  color: var(--secondary);
}

.member-panel {
  background: #fff;
  min-height: calc(100vh - 68px);
  overflow: hidden;
}

.profile-hero {
  position: relative;
  min-height: 140px;
  padding: 22px 12px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.settings-btn {
  position: absolute;
  top: 18px;
  right: 12px;
  border: 0;
  color: #fff;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.profile-line {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ddf7ff;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-name {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-phone,
.profile-status {
  opacity: 0.95;
  line-height: 1.55;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
}

.stats-card {
  position: relative;
  z-index: 2;
  margin: -6px 8px 0;
  padding: 10px 8px;
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-item {
  min-width: 0;
  text-align: center;
}

.stat-value {
  color: #06070a;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.4;
}

.stat-label {
  color: #8a929d;
  font-size: 12px;
}

.side-section {
  padding: 18px 10px 0;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.side-head h3 {
  margin: 0;
  font-size: 16px;
}

.side-head button,
.side-head a {
  border: 0;
  background: transparent;
  color: #8b9097;
  font-size: 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 19px;
}

.service-button {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #2d333b;
  min-height: 72px;
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.service-icon svg,
.tiny-icon svg,
.icon-holder svg,
.base-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.benefit-card {
  position: relative;
  min-height: 90px;
  padding: 12px 10px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  overflow: hidden;
  color: #10141a;
}

.benefit-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.benefit-card span {
  display: block;
  color: #626b76;
  font-size: 12px;
}

.benefit-action {
  margin-top: 10px;
  width: max-content;
  min-width: 42px;
  padding: 4px 11px;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  text-align: center;
}

.benefit-mark {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--accent);
  opacity: 0.9;
}

.benefit-mark svg {
  width: 24px;
  height: 24px;
  display: block;
  color: currentColor;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-card {
  margin: 2px 10px 0;
  min-height: 86px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: none;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
}

.stock-title {
  font-size: 20px;
  font-weight: 900;
}

.stock-name {
  font-size: 16px;
}

.stock-code {
  color: #7b8490;
  margin-top: 3px;
}

.stock-price {
  color: #2b9c41;
  font-size: 20px;
}

.stock-change {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 5px;
  color: #fff;
  background: #2f9c38;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.stock-card.is-up .stock-price {
  color: #de4b48;
}

.stock-card.is-up .stock-change {
  background: #de4b48;
}

.base-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.base-button {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #3b424b;
}

.base-icon {
  color: var(--secondary);
}

.logout {
  width: calc(100% - 34px);
  height: 42px;
  margin: 18px 17px 24px;
  border: 0;
  border-radius: 22px;
  background: #f0f2f5;
  color: #20242a;
}

.drawer-mask {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 40;
  transform: translate(-50%, 20px);
  min-width: 160px;
  max-width: min(340px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(16, 18, 24, 0.92);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-state {
  min-height: 70vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  body {
    background: #eff1f4;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .mobile-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 46px;
    background: #050505;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
  }

  .mobile-line,
  .center-open {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-line {
    font-size: 15px;
    font-weight: 700;
  }

  .mini-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--primary);
    font-weight: 900;
  }

  .center-open {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
  }

  .center-open .icon-holder {
    width: 24px;
    height: 24px;
  }

  .mobile-profile {
    min-height: 212px;
    padding: 42px 24px 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
  }

  .mobile-profile .profile-line {
    grid-template-columns: 76px 1fr;
    margin: 0;
    gap: 18px;
  }

  .mobile-profile .avatar {
    width: 76px;
    height: 76px;
  }

  .mobile-profile .profile-name {
    font-size: 24px;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    display: block;
  }

  .main-panel {
    min-height: calc(100vh - 258px);
    border: 0;
    border-radius: 8px 8px 0 0;
    margin-top: -8px;
    overflow: hidden;
  }

  .main-section {
    min-height: 640px;
  }

  .section-title {
    display: none;
  }

  .content-pad {
    padding: 0;
  }

  .tabs-row {
    min-height: 86px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e5e8ec;
  }

  .tab-button {
    min-width: 102px;
    height: 72px;
    font-size: 28px;
    color: #262b32;
    border-right: 1px solid #edf0f3;
  }

  .tab-button.is-active::after {
    bottom: 10px;
    width: 30px;
    height: 6px;
  }

  .empty-wrap {
    min-height: 460px;
    background: #f2f3f5;
    border-bottom: 1px solid #e7e9ec;
  }

  .empty-block img {
    width: 230px;
  }

  .empty-block {
    font-size: 20px;
    gap: 20px;
  }

  .week-shell {
    margin: 0;
    border-width: 0 0 1px;
    grid-template-columns: 0 minmax(0, 1fr) 0;
    height: 86px;
    overflow-x: auto;
  }

  .week-arrow {
    display: none;
  }

  .week-grid {
    min-width: 700px;
  }

  .subsection-title {
    margin: 0;
    padding: 0 20px;
    background: #fff;
  }

  .indicator-tabs {
    padding: 0 20px;
    gap: 36px;
    background: #fff;
  }

  .member-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 32;
    width: min(420px, 86vw);
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 0.24s ease;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.22);
  }

  body.drawer-open .member-panel {
    transform: translateX(0);
  }

  .drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 31;
    background: rgba(0, 0, 0, 0.48);
  }

  body.drawer-open .drawer-mask {
    display: block;
  }

  .member-panel .profile-hero {
    min-height: 236px;
    padding: 34px 28px 24px;
  }

  .member-panel .profile-line {
    grid-template-columns: 86px 1fr;
    gap: 22px;
    margin-top: 50px;
  }

  .member-panel .avatar {
    width: 86px;
    height: 86px;
  }

  .member-panel .profile-name {
    font-size: 28px;
  }

  .member-panel .profile-phone,
  .member-panel .profile-status {
    font-size: 18px;
  }

  .member-panel .settings-btn {
    top: 26px;
    right: 26px;
    font-size: 20px;
  }

  .member-panel .stats-card {
    margin: -14px 22px 0;
    padding: 20px 12px;
  }

  .member-panel .stat-value {
    font-size: 28px;
  }

  .member-panel .stat-label {
    font-size: 18px;
  }

  .member-panel .side-section {
    margin: 14px 18px 0;
    padding: 24px 18px 0;
    background: #fff;
    border-radius: 8px;
  }

  .member-panel .side-head h3 {
    font-size: 28px;
  }

  .member-panel .side-head button,
  .member-panel .side-head a {
    font-size: 18px;
  }

  .member-panel .service-grid {
    row-gap: 30px;
  }

  .member-panel .service-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
  }

  .member-panel .service-icon svg {
    width: 38px;
    height: 38px;
  }

  .member-panel .service-button {
    gap: 12px;
    font-size: 20px;
    min-height: 120px;
  }

  .member-panel .stock-card {
    margin: 18px;
    display: grid;
    grid-template-columns: 88px 1fr auto;
    box-shadow: none;
  }

  .member-panel .benefit-grid {
    gap: 10px;
  }

  .member-panel .benefit-card {
    min-height: 118px;
    padding: 18px 16px;
  }

  .member-panel .benefit-card strong {
    font-size: 22px;
  }

  .member-panel .benefit-card span {
    font-size: 18px;
  }

  .member-panel .base-grid {
    padding-bottom: 8px;
  }
}

@media (max-width: 520px) {
  .mobile-nav {
    height: 48px;
    padding: 0 12px;
  }

  .mobile-line {
    font-size: 14px;
  }

  .center-open {
    font-size: 14px;
  }

  .mobile-profile {
    min-height: 196px;
    padding: 34px 20px 26px;
  }

  .mobile-profile .profile-name {
    font-size: 22px;
  }

  .mobile-profile .profile-phone,
  .mobile-profile .profile-status {
    font-size: 16px;
  }

  .tab-button {
    min-width: 98px;
    font-size: 26px;
  }

  .empty-block img {
    width: 210px;
  }

  .empty-block {
    font-size: 19px;
  }

  .member-panel {
    width: min(420px, 88vw);
  }
}

@media (max-width: 420px) {
  .tab-button {
    min-width: 88px;
    font-size: 24px;
  }

  .mobile-profile .profile-line {
    grid-template-columns: 68px 1fr;
    gap: 16px;
  }

  .mobile-profile .avatar {
    width: 68px;
    height: 68px;
  }

  .mobile-profile .profile-name {
    font-size: 20px;
  }

  .mobile-profile .profile-phone,
  .mobile-profile .profile-status {
    font-size: 15px;
  }

  .member-panel .profile-line {
    grid-template-columns: 72px 1fr;
    gap: 16px;
  }

  .member-panel .avatar {
    width: 72px;
    height: 72px;
  }

  .member-panel .profile-name {
    font-size: 24px;
  }

  .member-panel .profile-phone,
  .member-panel .profile-status {
    font-size: 16px;
  }

  .member-panel .side-head h3 {
    font-size: 23px;
  }

  .member-panel .service-icon {
    width: 64px;
    height: 64px;
  }

  .member-panel .service-button {
    font-size: 17px;
  }
}
