/* ========================================================
   Account Workspace Refresh - scoped to #/account only
   ======================================================== */

.account-shell--overview {
  --account-panel-bg: rgba(255, 255, 255, 0.92);
  --account-panel-border: rgba(47, 111, 159, 0.12);
  --account-panel-shadow: 0 28px 60px -42px rgba(24, 50, 74, 0.3);
  --account-panel-shadow-strong: 0 34px 76px -44px rgba(24, 50, 74, 0.34);
  --account-ease: cubic-bezier(0.16, 1, 0.3, 1);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(93, 146, 194, 0.18), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(47, 111, 159, 0.16), transparent 26%),
    linear-gradient(180deg, #f8fcff 0%, #eff6fb 44%, #e8f1f7 100%);
}

.account-shell--overview::before,
.account-shell--overview::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(14px);
}

.account-shell--overview::before {
  top: 72px;
  right: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(47, 111, 159, 0.14) 0%, rgba(47, 111, 159, 0.03) 56%, transparent 74%);
}

.account-shell--overview::after {
  bottom: -180px;
  left: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(93, 146, 194, 0.14) 0%, rgba(93, 146, 194, 0.04) 56%, transparent 76%);
}

.account-topbar--account {
  position: relative;
  z-index: 3;
  padding: 22px 28px 0;
}

.account-shell--overview .account-topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-shell--overview .account-back-btn,
.account-shell--overview .account-link-btn,
.account-shell--overview .account-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 14px;
  transition:
    transform 220ms var(--account-ease),
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    box-shadow 220ms var(--account-ease),
    color 220ms var(--account-ease);
}

.account-shell--overview .account-back-btn svg,
.account-shell--overview .account-link-btn svg,
.account-shell--overview .account-primary-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.account-shell--overview .account-back-btn:hover,
.account-shell--overview .account-link-btn:hover,
.account-shell--overview .account-primary-btn:hover {
  transform: translateY(-2px);
}

.account-shell--overview .account-link-btn {
  border-color: rgba(24, 50, 74, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.account-shell--overview .account-link-btn:hover {
  border-color: rgba(47, 111, 159, 0.24);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 32px -28px rgba(36, 87, 127, 0.36);
}

.account-shell--overview .account-primary-btn {
  padding: 12px 20px;
  box-shadow: 0 20px 34px -24px rgba(36, 87, 127, 0.82);
}

.account-shell--overview .account-primary-btn:hover {
  box-shadow: 0 26px 40px -24px rgba(36, 87, 127, 0.72);
}

.account-shell--overview .account-link-btn.danger {
  color: var(--color-error);
  border-color: var(--color-error-border);
  background: rgba(255, 255, 255, 0.6);
}

.account-shell--overview .account-link-btn.danger:hover {
  background: var(--color-error-ultra-light);
  border-color: rgba(185, 92, 88, 0.3);
  color: var(--color-error-hover);
}

/* inline-flex 会盖掉原生 [hidden]，非管理员入口必须真正不占位 */
.account-shell--overview .account-link-btn[hidden],
.account-shell--overview .account-primary-btn[hidden] {
  display: none !important;
}

.account-page--overview {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.account-reveal {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: accountRise 760ms var(--account-ease) forwards;
  animation-delay: var(--account-delay, 0ms);
}

.account-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.account-sidebar {
  align-self: start;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-sidebar-card,
.account-shell--overview .account-panel,
.account-focus-card {
  border-radius: 22px;
  border: 1px solid var(--account-panel-border);
  background: var(--account-panel-bg);
  box-shadow: var(--account-panel-shadow);
}

.account-sidebar-card {
  padding: 22px;
}

.account-sidebar-card--summary {
  display: grid;
  gap: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.94)),
    var(--account-panel-bg);
}

.account-sidebar-summary-head {
  display: grid;
  gap: 14px;
}

.account-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 12px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.account-sidebar-identity {
  display: grid;
  gap: 12px;
}

.account-sidebar-identity-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.account-sidebar-identity-titles {
  display: grid;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.account-sidebar-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(24, 50, 74, 0.12);
  background: rgba(24, 50, 74, 0.06);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.account-sidebar-avatar--photo {
  position: relative;
  padding: 0;
  background: rgba(24, 50, 74, 0.04);
}

.account-sidebar-avatar--photo .account-sidebar-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* [hidden] 的 display:none 会被下面的 flex 覆盖，必须显式隐藏 */
.account-sidebar-avatar--photo .account-sidebar-avatar-letter[hidden] {
  display: none !important;
}
.account-sidebar-avatar--photo .account-sidebar-avatar-letter:not([hidden]) {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-sidebar-identity h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
}

.account-hero-badge {
  width: fit-content;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(24, 50, 74, 0.1);
}

.account-hero-badge--neutral {
  background: rgba(24, 50, 74, 0.06);
  border-color: rgba(24, 50, 74, 0.1);
  color: var(--color-text-primary);
}

.account-hero-badge--info {
  background: var(--color-info-ultra-light);
  border-color: var(--color-info-border);
  color: var(--color-info);
}

.account-hero-badge--success {
  background: var(--color-success-ultra-light);
  border-color: var(--color-success-border);
  color: var(--color-success);
}

.account-shell--overview #accountHeroDescription {
  margin: 0;
  font-size: 14px;
  line-height: 1.78;
  color: var(--color-text-secondary);
}

.account-overview-summary-head {
  display: grid;
  gap: 10px;
}

.account-overview-summary-label,
.account-sidebar-nav-label,
.account-stage-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(47, 111, 159, 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.account-overview-summary-head strong {
  display: block;
  font-family: var(--font-display, var(--ad-font-serif));
  font-size: clamp(24px, 2.5vw, 30px);
  font-weight: 400;
  line-height: 1.08;
  color: var(--color-text-primary);
}

.account-overview-summary-head p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.72;
}

.account-overview-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-overview-mini-card {
  padding: 14px 14px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(24, 50, 74, 0.08);
}

.account-overview-mini-card span {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.account-overview-mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--color-text-primary);
  word-break: break-word;
}

.account-section-nav {
  display: grid;
  gap: 8px;
}

.account-section-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--color-text-secondary);
  text-align: left;
  cursor: pointer;
  transition:
    transform 220ms var(--account-ease),
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    color 220ms var(--account-ease),
    box-shadow 220ms var(--account-ease);
}

.account-section-btn:hover {
  transform: translateX(4px);
  border-color: rgba(47, 111, 159, 0.12);
  background: rgba(47, 111, 159, 0.06);
  color: var(--color-text-primary);
}

.account-section-btn.is-active {
  border-color: rgba(47, 111, 159, 0.16);
  background: linear-gradient(90deg, rgba(47, 111, 159, 0.1), rgba(255, 255, 255, 0.78));
  color: var(--color-text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.account-section-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(47, 111, 159, 0.08);
  color: var(--color-primary);
  flex-shrink: 0;
}

.account-section-btn__icon svg {
  width: 16px;
  height: 16px;
}

.account-section-btn__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.account-section-btn__text {
  min-width: 0;
}

.account-section-btn__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--color-error);
  box-shadow: 0 0 0 4px rgba(185, 92, 88, 0.12);
  flex-shrink: 0;
}

.account-sidebar-card--footer {
  display: grid;
  gap: 14px;
}

.account-sidebar-actions {
  display: grid;
  gap: 10px;
}

.account-sidebar-actions .account-link-btn {
  width: 100%;
}

.account-sidebar-card--logout {
  padding: 16px 22px;
}

.account-sidebar-card--logout .account-link-btn {
  width: 100%;
}

.account-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
}

.account-stage::-webkit-scrollbar {
  display: none;
}

.account-stage-head {
  display: grid;
  gap: 10px;
  padding: 26px 28px;
  border-radius: 22px;
  border: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 32px -28px rgba(24, 50, 74, 0.16);
}

.account-stage-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
}

.account-stage-head p {
  margin: 0;
  max-width: 760px;
  color: var(--color-text-secondary);
  line-height: 1.76;
}

.account-stage-panels {
  position: relative;
}

.account-stage-panel {
  display: none;
}

.account-stage-panel.is-active {
  display: grid;
  gap: 18px;
  animation: accountStagePanelIn 340ms var(--account-ease);
}

.account-overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--account-panel-border);
  background:
    linear-gradient(138deg, rgba(244, 250, 255, 0.98), rgba(255, 255, 255, 0.95)),
    linear-gradient(180deg, rgba(47, 111, 159, 0.04), transparent);
  box-shadow: var(--account-panel-shadow);
  overflow: hidden;
}

.account-overview-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(93, 146, 194, 0.12), transparent 38%),
    linear-gradient(120deg, rgba(47, 111, 159, 0.05), transparent 44%);
  pointer-events: none;
}

.account-overview-main,
.account-overview-summary {
  position: relative;
  z-index: 1;
}

.account-overview-main {
  display: grid;
  gap: 14px;
  align-content: start;
}

.account-overview-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}

.account-overview-title-row h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
}

.account-overview-main p {
  margin: 0;
  font-size: 14px;
  line-height: 1.82;
  color: var(--color-text-secondary);
}

.account-overview-summary--spotlight {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 22px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(160deg, #2c4e9a 0%, #27458a 46%, #21386f 100%);
  box-shadow: 0 30px 46px -38px rgba(36, 87, 127, 0.76);
}

.account-overview-summary--spotlight .account-overview-summary-label {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
}

.account-overview-summary--spotlight .account-overview-summary-head strong,
.account-overview-summary--spotlight .account-overview-summary-head p {
  color: #fff;
}

.account-overview-summary--spotlight .account-overview-summary-head p {
  color: rgba(255, 255, 255, 0.82);
}

.account-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-overview-summary--spotlight .account-primary-btn {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.96);
  color: var(--color-text-primary);
  box-shadow: none;
}

.account-overview-summary--spotlight .account-primary-btn:hover {
  background: #fff;
  border-color: #fff;
}

.account-overview-summary--spotlight .account-link-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: none;
}

.account-overview-summary--spotlight .account-link-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

.account-focus-grid,
.account-secondary-grid {
  display: grid;
  gap: 18px;
}

.account-focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-focus-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  transition:
    transform 240ms var(--account-ease),
    border-color 240ms var(--account-ease),
    box-shadow 240ms var(--account-ease);
}

.account-focus-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  opacity: 0.95;
}

.account-focus-card--neutral::before {
  background: linear-gradient(90deg, rgba(24, 50, 74, 0.48), rgba(24, 50, 74, 0.1));
}

.account-focus-card--info::before {
  background: linear-gradient(90deg, #3d8bc0, rgba(93, 146, 194, 0.16));
}

.account-focus-card--success::before {
  background: linear-gradient(90deg, #2d7c6a, rgba(45, 124, 106, 0.14));
}

.account-focus-card--warning::before {
  background: linear-gradient(90deg, #ad7a2d, rgba(173, 122, 45, 0.14));
}

.account-focus-card:hover,
.account-shell--overview .account-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 159, 0.18);
  box-shadow: var(--account-panel-shadow-strong);
}

.account-focus-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-focus-card__icon,
.account-panel-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(47, 111, 159, 0.08);
  color: var(--color-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  flex-shrink: 0;
}

.account-focus-card__icon {
  width: 32px;
  height: 32px;
}

.account-focus-card__icon svg,
.account-panel-header__icon svg {
  width: 16px;
  height: 16px;
}

.account-focus-card--success .account-focus-card__icon {
  background: rgba(45, 124, 106, 0.1);
  color: var(--color-success);
}

.account-focus-card--warning .account-focus-card__icon {
  background: rgba(173, 122, 45, 0.1);
  color: var(--color-warning);
}

.account-focus-card__eyebrow {
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-focus-card__value {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display, var(--ad-font-serif));
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}

.account-focus-card__meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.72;
}

.account-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-shell--overview .account-panel {
  padding: 20px 24px;
  transition:
    transform 240ms var(--account-ease),
    box-shadow 240ms var(--account-ease),
    border-color 240ms var(--account-ease);
}

.account-panel--referral {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.96)),
    var(--account-panel-bg);
}

.account-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.account-panel-header__icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(47, 111, 159, 0.12), rgba(93, 146, 194, 0.08));
}

.account-panel-header__copy {
  min-width: 0;
}

.account-panel-header h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-family: var(--font-display, var(--ad-font-serif));
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.account-panel-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.76;
  color: var(--color-text-secondary);
}

.account-status-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.account-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.account-status-item span {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.account-status-item strong {
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.account-status-item--success {
  background: rgba(45, 124, 106, 0.06);
  border-color: rgba(45, 124, 106, 0.15);
}

.account-status-item--info {
  background: rgba(79, 115, 147, 0.06);
  border-color: rgba(79, 115, 147, 0.15);
}

.account-status-item--warning {
  background: rgba(173, 122, 45, 0.06);
  border-color: rgba(173, 122, 45, 0.15);
}

.account-shell--overview .account-form {
  margin-top: 24px;
}

.account-field {
  position: relative;
  display: block;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.account-field::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), rgba(93, 146, 194, 0.38));
  transform: scaleX(0.16);
  transform-origin: left center;
  opacity: 0;
  transition: transform 220ms var(--account-ease), opacity 220ms var(--account-ease);
}

.account-field:focus-within::after {
  transform: scaleX(1);
  opacity: 1;
}

.account-shell--overview .account-field span {
  display: block;
  margin-bottom: 10px;
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 700;
}

.account-shell--overview .account-field input {
  border-radius: 14px;
  border: 1px solid rgba(24, 50, 74, 0.1);
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.84);
  transition:
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    box-shadow 220ms var(--account-ease),
    transform 220ms var(--account-ease);
}

.account-shell--overview .account-field input:focus {
  background: #fff;
  border-color: rgba(47, 111, 159, 0.2);
  box-shadow: 0 0 0 4px rgba(47, 111, 159, 0.08);
}

.account-shell--overview .account-field input:disabled {
  background: rgba(237, 244, 249, 0.9);
  border-color: rgba(24, 50, 74, 0.08);
}

.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.account-referral-shell {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.account-referral-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  overflow: hidden;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(93, 146, 194, 0.24);
  background: linear-gradient(135deg, rgba(230, 243, 252, 0.98), rgba(255, 255, 255, 0.98) 56%, rgba(228, 247, 245, 0.88));
}

.account-referral-hero-card::before,
.account-referral-hero-card::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.account-referral-hero-card::before {
  top: -72px;
  right: -52px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(93, 146, 194, 0.22), transparent 68%);
}

.account-referral-hero-card::after {
  bottom: -96px;
  left: -36px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(73, 182, 170, 0.18), transparent 72%);
}

.account-referral-hero-copy,
.account-referral-hero-actions {
  position: relative;
  z-index: 1;
}

.account-referral-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.account-referral-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.account-referral-code-row strong {
  font-family: var(--font-display, var(--ad-font-serif));
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  word-break: break-word;
}

.account-referral-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(45, 124, 106, 0.12);
  border: 1px solid rgba(45, 124, 106, 0.18);
  color: var(--color-success);
  font-size: 12px;
  font-weight: 700;
}

.account-referral-hero-copy p {
  margin: 14px 0 0;
  color: var(--color-text-secondary);
  line-height: 1.78;
}

.account-referral-hero-actions {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 240px;
}

.account-referral-hero-actions .account-primary-btn {
  width: 100%;
}

.account-referral-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 12.5px;
  line-height: 1.7;
  word-break: break-word;
}

.account-referral-source svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.account-referral-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-referral-summary-card {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.account-referral-summary-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: rgba(24, 50, 74, 0.18);
}

.account-referral-summary-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-referral-summary-card__icon,
.account-detail-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 111, 159, 0.08);
  color: var(--color-primary);
  flex-shrink: 0;
}

.account-referral-summary-card__icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.account-referral-summary-card__icon svg,
.account-detail-card__icon svg {
  width: 14px;
  height: 14px;
}

.account-referral-summary-card__head > span:last-child {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.account-referral-summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--color-text-primary);
  word-break: break-word;
}

.account-referral-summary-card p {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
  line-height: 1.62;
  font-size: 12.5px;
}

.account-referral-summary-card--wide {
  grid-column: 1 / -1;
}

.account-referral-summary-card--success {
  background: rgba(45, 124, 106, 0.06);
  border-color: rgba(45, 124, 106, 0.14);
}

.account-referral-summary-card--success::before {
  background: var(--color-success);
}

.account-referral-summary-card--info {
  background: rgba(79, 115, 147, 0.06);
  border-color: rgba(79, 115, 147, 0.14);
}

.account-referral-summary-card--info::before {
  background: var(--color-info);
}

.account-referral-summary-card--warning {
  background: rgba(173, 122, 45, 0.06);
  border-color: rgba(173, 122, 45, 0.14);
}

.account-referral-summary-card--warning::before {
  background: var(--color-warning);
}

.account-referral-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-referral-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(24, 50, 74, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 220ms var(--account-ease),
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    color 220ms var(--account-ease);
}

.account-referral-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 159, 0.18);
  color: var(--color-text-primary);
}

.account-referral-tab.is-active {
  background: rgba(47, 111, 159, 0.1);
  border-color: rgba(47, 111, 159, 0.18);
  color: var(--color-text-primary);
}

.account-referral-tab-panels {
  display: grid;
}

.account-referral-stream {
  display: none;
}

.account-referral-stream.is-active {
  display: block;
}

.account-detail-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.account-detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.account-detail-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-detail-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.account-detail-card__header h3 {
  margin: 0;
  font-size: 17px;
  font-family: var(--font-display, var(--ad-font-serif));
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.account-detail-card__header > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 159, 0.08);
  border: 1px solid rgba(47, 111, 159, 0.14);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.account-activity-list {
  display: grid;
  gap: 10px;
}

.account-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(24, 50, 74, 0.07);
  background: rgba(255, 255, 255, 0.86);
}

.account-activity-row__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-activity-row__copy strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--color-text-primary);
  word-break: break-word;
}

.account-activity-row__copy span {
  color: var(--color-text-secondary);
  font-size: 12.5px;
  line-height: 1.62;
}

.account-activity-row__meta {
  color: var(--color-text-primary);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.account-notice-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.account-notice-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 18px 24px;
  border-radius: 18px;
  border: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.88);
  transition:
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    box-shadow 220ms var(--account-ease);
}

.account-notice-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: rgba(24, 50, 74, 0.18);
}

.account-notice-card.is-unread {
  border-color: rgba(185, 92, 88, 0.18);
  background: rgba(255, 251, 251, 0.96);
  box-shadow: 0 16px 30px -26px rgba(185, 92, 88, 0.3);
}

.account-notice-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-notice-card__meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  flex-shrink: 0;
}

.account-notice-card__type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 159, 0.08);
  border: 1px solid rgba(47, 111, 159, 0.14);
  color: var(--color-primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.account-notice-card__unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-error);
  box-shadow: 0 0 0 4px rgba(185, 92, 88, 0.12);
  flex-shrink: 0;
}

.account-notice-card__head h3 {
  margin: 10px 0 0;
  font-size: 18px;
  font-family: var(--font-display, var(--ad-font-serif));
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.account-notice-card__head time {
  color: var(--color-text-secondary);
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.account-notice-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(185, 92, 88, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-error);
  font-size: 12px;
  font-weight: 700;
  transition:
    transform 220ms var(--account-ease),
    border-color 220ms var(--account-ease),
    background-color 220ms var(--account-ease),
    color 220ms var(--account-ease);
}

.account-notice-delete-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.account-notice-delete-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(185, 92, 88, 0.28);
  background: var(--color-error-ultra-light);
  color: var(--color-error-hover);
}

.account-notice-delete-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.account-notice-card p {
  margin: 14px 0 0;
  color: var(--color-text-secondary);
  line-height: 1.78;
}

.account-notice-card--success {
  background: rgba(45, 124, 106, 0.05);
  border-color: rgba(45, 124, 106, 0.14);
}

.account-notice-card--success::before {
  background: var(--color-success);
}

.account-notice-card--warning {
  background: rgba(173, 122, 45, 0.05);
  border-color: rgba(173, 122, 45, 0.14);
}

.account-notice-card--warning::before {
  background: var(--color-warning);
}

.account-notice-card--info {
  background: rgba(79, 115, 147, 0.05);
  border-color: rgba(79, 115, 147, 0.14);
}

.account-notice-card--info::before {
  background: var(--color-info);
}

.account-empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px 24px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(24, 50, 74, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.account-empty-state--soft {
  background: rgba(255, 255, 255, 0.76);
}

.account-empty-state--compact {
  padding: 24px 18px;
}

.account-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(47, 111, 159, 0.08);
  color: var(--color-primary);
}

.account-empty-state__icon svg {
  width: 22px;
  height: 22px;
}

.account-empty-state__copy {
  display: grid;
  gap: 8px;
  max-width: 420px;
}

.account-empty-state__copy h3 {
  margin: 0;
  font-family: var(--font-display, var(--ad-font-serif));
  font-size: 20px;
  font-weight: 400;
  line-height: 1.34;
  color: var(--color-text-primary);
}

.account-empty-state__copy p {
  margin: 0;
  line-height: 1.72;
  color: var(--color-text-secondary);
}

.account-empty-state--success .account-empty-state__icon {
  background: rgba(45, 124, 106, 0.1);
  color: var(--color-success);
}

.account-empty-state--info .account-empty-state__icon {
  background: rgba(79, 115, 147, 0.1);
  color: var(--color-info);
}

.account-empty-state--warning .account-empty-state__icon {
  background: rgba(173, 122, 45, 0.1);
  color: var(--color-warning);
}

/* User info card at top of overview */
.account-userinfo-card {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 22px;
  border: 1px solid var(--account-panel-border);
  background: var(--account-panel-bg);
  box-shadow: var(--account-panel-shadow);
}

.account-userinfo-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.account-userinfo-card__identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.account-userinfo-card__identity h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.account-userinfo-card__plan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.account-userinfo-card__plan strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
}

#accountHeroDescription {
  margin: 0;
  font-size: 13px;
  line-height: 1.72;
  color: var(--color-text-secondary);
}

.account-userinfo-card .account-overview-mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Sidebar avatar smaller in userinfo card */
.account-userinfo-card .account-sidebar-avatar {
  width: 46px;
  height: 46px;
  font-size: 18px;
  flex-shrink: 0;
}

.account-shell--overview .account-toast {
  border-radius: 16px;
  border-color: rgba(24, 50, 74, 0.12);
  box-shadow: 0 20px 36px -20px rgba(24, 50, 74, 0.18);
}

.account-shell--overview .account-toast.error::before {
  background: var(--color-error);
}

@keyframes accountRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes accountStagePanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .account-userinfo-card__plan {
    margin-left: 0;
    width: 100%;
  }

  .account-referral-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .account-shell--overview {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .account-page--overview {
    height: auto;
    display: block;
    padding: 24px 20px 60px;
  }

  .account-workspace {
    display: flex;
    flex-direction: column;
  }

  .account-sidebar {
    position: static;
    align-self: auto;
  }

  .account-stage {
    height: auto;
    overflow-y: visible;
    padding-right: 0;
  }

  .account-userinfo-card .account-overview-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-section-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .account-section-btn {
    flex: 0 0 auto;
    min-width: 148px;
  }

  .account-focus-grid,
  .account-secondary-grid {
    grid-template-columns: 1fr;
  }

  .account-referral-hero-card {
    grid-template-columns: 1fr;
  }

  .account-referral-hero-actions {
    min-width: 0;
  }

  .account-activity-row,
  .account-notice-card__head,
  .account-status-item {
    grid-template-columns: 1fr;
  }

  .account-notice-card__head,
  .account-status-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-notice-card__meta {
    width: 100%;
    justify-items: start;
  }

  .account-status-item strong,
  .account-activity-row__meta {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .account-topbar--account {
    padding: 18px 20px 0;
  }

  .account-shell--overview .account-topbar-actions {
    justify-content: stretch;
  }

  .account-shell--overview .account-topbar-actions .account-link-btn,
  .account-shell--overview .account-topbar-actions .account-back-btn {
    flex: 1 1 100%;
  }

  .account-sidebar-card,
  .account-stage-head,
  .account-overview-hero,
  .account-shell--overview .account-panel,
  .account-focus-card {
    padding: 22px;
    border-radius: 22px;
  }

  .account-overview-mini-grid,
  .account-referral-summary {
    grid-template-columns: 1fr;
  }

  .account-referral-summary-card--wide {
    grid-column: auto;
  }

  .account-overview-actions,
  .account-form-actions,
  .account-sidebar-actions {
    flex-direction: column;
  }

  .account-overview-summary--spotlight .account-primary-btn,
  .account-overview-summary--spotlight .account-link-btn,
  .account-shell--overview .account-primary-btn,
  .account-shell--overview .account-link-btn {
    width: 100%;
  }

  .account-section-btn {
    min-width: 132px;
  }

  .account-referral-tab-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-referral-tab {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-reveal,
  .account-stage-panel.is-active {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .account-shell--overview .account-back-btn,
  .account-shell--overview .account-link-btn,
  .account-shell--overview .account-primary-btn,
  .account-focus-card,
  .account-shell--overview .account-panel,
  .account-section-btn,
  .account-referral-tab {
    transition: none;
  }
}
