/* 个人中心（云白）：账户概览卡 + 两个标签页（账户与安全 / 设备与流量）；设置项是行式列表，分隔线从文字起点缩进 */
.tt-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding: var(--card-pad);
}
.tt-account-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tt-avatar-lg {
  width: 56px;
  height: 56px;
}
.tt-avatar-lg .avatar-letter { font: var(--t-headline); line-height: 1; }
.tt-account-text { min-width: 0; }
.tt-account-name {
  font: var(--t-title);
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-account-plan { margin-top: 2px; font: var(--t-caption); color: var(--text-3); }
.tt-account-wallet { text-align: end; }
.tt-account-wallet-label { font: var(--t-caption); color: var(--text-3); }
.wallet-amount {
  font: var(--t-stat-large);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.wallet-amount small { font: var(--t-stat-large-unit); font-variant-numeric: tabular-nums; color: var(--text-2); letter-spacing: 0; }

.user-tabs { margin: var(--section-gap) 0; }
.user-pane { display: grid; gap: var(--section-gap); }
.user-pane[hidden] { display: none; }
.panel { padding: var(--card-pad); }
.panel-desc {
  margin: 4px 0 16px;
  font: var(--t-body-secondary);
  color: var(--text-2);
}
.panel .tt-card-title + form,
.panel .tt-card-title + .switch-row { margin-top: 12px; }
.panel-foot {
  display: flex;
  justify-content: flex-end;
}

/* ---------- 行式设置项（≥48px 行高） ---------- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--row-h);
  border-bottom: 0;
  box-shadow: inset 0 calc(var(--hairline) * -1) 0 var(--border);
}
.switch-row:last-child {
  border-bottom: 0;
  box-shadow: none;
}
.switch-label {
  font: var(--t-body);
  color: var(--text-1);
}

/* ---------- 登录设备：图标块 + 文字，分隔线从文字起点开始 ---------- */
.session-list {
  display: flex;
  flex-direction: column;
}
.session-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--row-h);
  padding: 10px 0;
}
.session-item + .session-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 44px;
  height: var(--hairline);
  background: var(--border);
}
.session-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: var(--icon-18);
  flex-shrink: 0;
}
.session-info {
  flex: 1;
  min-width: 0;
}
.session-email {
  font: var(--t-body-strong);
  color: var(--text-1);
  word-break: break-all;
}
.session-tag {
  margin-inline-start: 6px;
}
.session-expire {
  margin-top: 2px;
  font: var(--t-caption);
  color: var(--text-3);
}

/* ---------- Telegram ---------- */
.tg-disabled {
  font: var(--t-body);
  color: var(--text-3);
}
.tg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--row-h);
}
.tg-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: var(--icon-18);
  flex-shrink: 0;
}
.tg-info {
  flex: 1;
  min-width: 0;
}
.tg-name {
  font: var(--t-body-strong);
  color: var(--text-1);
  word-break: break-all;
}
/* 绑定状态：色点 + 文字 */
.tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: var(--t-caption);
  color: var(--text-3);
}
.tg-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
}
.tg-badge.is-success { color: var(--success-text); }
.tg-badge.is-success .tg-badge-dot {
  background: var(--success);
}

/* ---------- 流量明细 ---------- */
.traffic-total {
  font: var(--t-body-strong);
  font-variant-numeric: tabular-nums;
  color: var(--primary-text);
}
.traffic-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.traffic-card {
  border-radius: var(--radius-inner);
  background: var(--bg-sunken);
  padding: 12px 16px;
}
.tc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.tc-label {
  font: var(--t-caption);
  color: var(--text-3);
  flex-shrink: 0;
}
.tc-value {
  font: var(--t-caption);
  text-align: right;
  color: var(--text-2);
}

.traffic-table {
  min-width: 640px;
}
.user .tt-table-wrap { overflow-x: auto; }

@media screen and (max-width: 768px) {
  /* 账户卡：头像 + 邮箱一行，钱包作为下方一行（金额 + 管理入口） */
  /* 不能 wrap：多行 flex 的行宽取内容宽，长邮箱会把卡片撑出屏幕 */
  .tt-account-card { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; }
  .tt-account-id { gap: 12px; }
  .tt-avatar-lg { width: 48px; height: 48px; }
  .tt-account-wallet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px 12px;
    padding-top: 14px;
    border-top: 0;
    box-shadow: inset 0 var(--hairline) 0 var(--border);
    text-align: start;
  }
  .tt-account-wallet-label { flex-basis: 100%; }
  .tt-account-wallet .tt-btn-link { padding-inline: 0; }
  /* 分段控件铺满：轨道仍是 1px 内边距、gap 0，宽度交给 --tt-tab-count */
  .user-tabs { width: 100%; margin: 16px 0 12px; }
  .user-pane { gap: 12px; }
  .panel-foot .tt-btn,
  .panel > .tt-btn { width: 100%; }
}
