:root {
  color-scheme: light;
  --page: #fbfcfc;
  --surface: #ffffff;
  --text: #252525;
  --muted: #8b8b8b;
  --subtle: #a2a2a2;
  --line: #e6e7e6;
  --line-soft: #f0f1f0;
  --selected: #eeeeed;
  --brand: #4d66e8;
  --brand-soft: #eef1ff;
  --shadow: 0 14px 34px rgba(31, 39, 34, 0.035);
  --radius: 17px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(77, 102, 232, .24);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.profile-app {
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px 0 35px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .94);
}

.brand,
.topbar-actions,
.account-button,
.account-dropdown-user,
.account-summary,
.nav-item,
.sidebar-footer a,
.plan-card-header,
.usage-line,
.section-heading-row,
.modal-close {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
}

.brand img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name {
  color: #17191a;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.topbar-actions {
  gap: 21px;
}

.account-menu {
  position: relative;
}

.account-button {
  gap: 8px;
  padding: 0;
  background: transparent;
  color: #4f4f4f;
  font-size: 13px;
}

.account-button svg,
.nav-item svg,
.sidebar-footer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chevron-icon {
  width: 13px;
  height: 13px;
  color: #888;
}

.avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dceee6;
  color: #3f8c74;
  font-weight: 600;
}

.avatar-small {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.avatar-large {
  width: 56px;
  height: 56px;
  font-size: 21px;
}

.account-button {
  gap: 5px;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 136px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(30, 36, 32, .10);
}

.account-dropdown > button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.account-dropdown > button:hover {
  background: var(--selected);
}

.account-dropdown {
  right: 0;
  width: 220px;
  padding: 10px;
}

.account-dropdown-user {
  gap: 10px;
  padding: 5px 4px 9px;
}

.account-dropdown-user div {
  min-width: 0;
}

.account-dropdown-user div > strong,
.account-dropdown-user div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-user strong {
  font-size: 13px;
}

.account-dropdown-user div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.dropdown-divider {
  height: 1px;
  margin: 0 0 5px;
  background: var(--line-soft);
}

.workspace {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  display: flex;
  min-height: calc(100vh - 64px);
  flex-direction: column;
  padding: 27px 22px 25px;
  border-right: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .58);
}

.account-summary {
  gap: 9px;
  min-width: 0;
  padding: 0 3px 28px;
}

.account-email {
  min-width: 0;
  overflow: hidden;
  color: #222;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f1f1f0;
  color: #6d6d6d;
  font-size: 11px;
  line-height: 1;
}

.profile-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  gap: 12px;
  min-height: 39px;
  padding: 0 13px;
  border-radius: 9px;
  background: transparent;
  color: #4b4b4b;
  text-align: left;
  transition: background-color .18s ease, color .18s ease;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  color: #666;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--selected);
  color: #202020;
}

.nav-item.is-active {
  font-weight: 600;
}

.nav-item.is-active svg {
  color: #343434;
}

.sidebar-footer {
  display: grid;
  gap: 15px;
  margin-top: auto;
  padding: 24px 13px 0;
  border-top: 1px solid var(--line-soft);
}

.sidebar-footer a {
  gap: 10px;
  color: #777;
  font-size: 13px;
}

.sidebar-footer a:hover {
  color: #222;
}

.sidebar-footer svg {
  width: 16px;
  height: 16px;
}

.sidebar-footer a:last-child {
  display: block;
  padding-left: 26px;
  color: #a0a0a0;
  font-size: 12px;
}

.main-content {
  position: relative;
  min-width: 0;
  padding: 28px clamp(28px, 5vw, 74px) 70px;
  background:
    radial-gradient(circle at 17% 5%, rgba(210, 235, 227, .22) 0, transparent 17%),
    linear-gradient(120deg, rgba(255, 255, 255, .52), rgba(249, 251, 250, .88));
}

.view-panel {
  width: min(100%, 1000px);
  margin: 0 auto;
}

.page-heading {
  margin-bottom: 42px;
}

.page-heading h1 {
  margin: 0;
  color: #222;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.25;
}

.page-heading p {
  margin: 7px 0 0;
  color: #a1a4a2;
  font-size: 14px;
  line-height: 1.6;
}

.content-section {
  margin-top: 27px;
}

.page-heading + .content-section {
  margin-top: 0;
}

.content-section h2 {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 16px 40px;
  color: #303232;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -.015em;
}

.section-heading-row {
  justify-content: space-between;
}

.section-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 40px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.section-action span {
  font-size: 17px;
  line-height: 1;
  transition: transform .18s ease;
}

.section-action:hover span {
  transform: translateX(3px);
}

.section-heading-row h2 {
  margin-bottom: 16px;
}

.info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  border: 1px solid #8f9390;
  border-radius: 50%;
  background: transparent;
  color: #868a87;
  vertical-align: 1px;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.info-button:hover {
  border-color: #303232;
  color: #303232;
}

.plan-card,
.empty-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.plan-card {
  padding: 39px 40px 40px;
}

.plan-card-header {
  justify-content: space-between;
  gap: 20px;
}

.plan-card-header h3 {
  margin: 0;
  color: #343638;
  font-size: 27px;
  font-weight: 450;
  letter-spacing: -.035em;
}

.plan-card-header p {
  margin: 6px 0 0;
  color: #9ea2a0;
  font-size: 14px;
}

.primary-button,
.secondary-button {
  min-height: 34px;
  padding: 0 19px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.primary-button {
  background: #292a2a;
  color: #fff;
}

.primary-button:hover {
  background: #111212;
  box-shadow: 0 6px 14px rgba(25, 25, 25, .14);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #dfe2e0;
  color: #9ca29e;
  box-shadow: none;
  transform: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #353736;
}

.secondary-button:hover {
  background: #f6f7f6;
}

.usage-block {
  margin-top: 31px;
}

.usage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.usage-block h4 {
  margin: 0;
  color: #303232;
  font-size: 15px;
  font-weight: 600;
}

.usage-heading p {
  margin: 5px 0 0;
  color: #969f9a;
  font-size: 12px;
}

.usage-stack {
  display: grid;
  gap: 12px;
}

.usage-item {
  padding: 0;
}

.usage-line {
  justify-content: space-between;
  gap: 20px;
  color: #7d8782;
  font-size: 13px;
}

.usage-line > span:last-child {
  color: #6f7d75;
  font-size: 12px;
}

.usage-line strong {
  margin-left: 12px;
  color: #252626;
  font-weight: 500;
}

.progress-track {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f2f1;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #303332;
}

.usage-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.subtle-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.topup-list {
  display: grid;
  gap: 16px;
}

.topup-card {
  padding: 24px 28px;
}

.topup-card-header strong {
  display: block;
  color: #303232;
  font-size: 15px;
  font-weight: 550;
}

.topup-card-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.empty-card {
  display: flex;
  min-height: 154px;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: #9c9f9d;
}

.empty-state-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.empty-state-copy small {
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 27px;
  padding: 0;
  background: transparent;
  color: #8f9390;
  font-size: 13px;
}

.text-button span {
  color: #777b78;
  font-size: 24px;
  font-weight: 300;
  line-height: 12px;
}

.text-button:hover {
  color: #292b2a;
}

.detail-card {
  padding: 32px 40px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}

.profile-identity strong,
.profile-identity > div > span {
  display: block;
}

.profile-identity strong {
  font-size: 17px;
}

.profile-identity div span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 50px;
  padding: 27px 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}

.detail-list span {
  color: var(--muted);
}

.detail-list strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 30;
  bottom: 28px;
  left: 50%;
  padding: 11px 17px;
  border: 1px solid #dfe3e0;
  border-radius: 8px;
  background: #292a2a;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
  font-size: 13px;
  transform: translateX(-50%);
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 37, 34, .24);
}

.modal {
  position: relative;
  width: min(100%, 480px);
  padding: 35px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(25, 30, 27, .18);
}

.modal-close {
  position: absolute;
  top: 17px;
  right: 19px;
  width: 29px;
  height: 29px;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: #8d928f;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.modal-close:hover {
  background: #f1f2f1;
}

.modal-eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
}

.modal h2 {
  margin: 10px 0 0;
  font-size: 23px;
  font-weight: 600;
}

.modal > p {
  margin: 9px 0 23px;
  color: var(--muted);
  line-height: 1.6;
}

.upgrade-options {
  display: grid;
  gap: 10px;
}

.upgrade-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.upgrade-option:hover,
.upgrade-option.is-selected {
  border-color: #929bde;
  background: #f8f9ff;
}

.upgrade-option.is-recommended::after {
  position: absolute;
}

.upgrade-option strong,
.upgrade-option small {
  display: block;
}

.upgrade-option strong {
  font-size: 14px;
}

.upgrade-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.upgrade-option b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.modal-confirm {
  width: 100%;
  margin-top: 21px;
}

@media (max-width: 840px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .main-content {
    padding-right: 30px;
    padding-left: 30px;
  }

  .content-section h2 {
    margin-left: 16px;
  }

  .section-action {
    margin-right: 25px;
  }

  .plan-card,
  .empty-card,
  .detail-card {
    padding-right: 25px;
    padding-left: 25px;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

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

  .topbar-actions {
    gap: 15px;
  }

  .workspace {
    display: block;
    min-height: calc(100vh - 58px);
  }

  .sidebar {
    display: block;
    min-height: 0;
    padding: 16px 12px 11px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .account-summary {
    padding: 0 5px 13px;
  }

  .profile-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    padding: 0 11px;
  }

  .nav-item svg {
    width: 15px;
    height: 15px;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding: 28px 16px 48px;
  }

  .page-heading {
    margin-bottom: 32px;
  }

  .page-heading h1 {
    font-size: 26px;
  }

  .content-section h2 {
    margin-left: 4px;
    margin-bottom: 12px;
    font-size: 16px;
  }

  .section-heading-row {
    align-items: flex-start;
    gap: 12px;
  }

  .section-action {
    flex: 0 0 auto;
    margin-right: 4px;
    padding-top: 2px;
  }

  .plan-card {
    padding: 25px 20px 26px;
  }

  .usage-heading {
    gap: 10px;
  }

  .topup-list {
    grid-template-columns: 1fr;
  }

  .plan-card-header {
    align-items: flex-start;
  }

  .plan-card-header h3 {
    font-size: 24px;
  }

  .usage-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .usage-line > span:last-child {
    align-self: flex-end;
  }

  .empty-card {
    min-height: 132px;
    padding: 0 20px;
  }

  .detail-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal {
    padding: 29px 22px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
