/* ========================================
   Identity CSS - 身份管理页
   风格与讯息页一致：纯白背景 · 黑色按键
   ======================================== */

/* ---- 全屏容器 ---- */
.identity-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: var(--z-drawer);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.identity-screen.is-active {
  display: flex;
}

/* ================================================
   1. 顶部导航栏
   ================================================ */
.identity-nav {
  height: var(--status-bar-height);
  margin-top: var(--safe-area-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background-color: #ffffff;
  flex-shrink: 0;
  position: relative;
}

.identity-nav__back {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
}

.identity-nav__back:active {
  background-color: rgba(0, 0, 0, 0.04);
}

.identity-nav__back svg {
  width: 22px;
  height: 22px;
}

.identity-nav__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.3px;
}

.identity-nav__add {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
}

.identity-nav__add:active {
  background-color: rgba(0, 0, 0, 0.04);
}

.identity-nav__add svg {
  width: 22px;
  height: 22px;
}

/* ================================================
   2. 内容区
   ================================================ */
.identity-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--spacing-lg);
  padding-bottom: calc(var(--spacing-3xl) + var(--safe-area-bottom));
}

/* ================================================
   3. 空状态
   ================================================ */
.identity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 30%;
}

.identity-empty__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--color-text-hint);
  opacity: 0.3;
}

.identity-empty__icon svg {
  width: 100%;
  height: 100%;
}

.identity-empty__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-hint);
}

/* ================================================
   4. 身份列表
   ================================================ */
.identity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}

/* ---- 单个身份卡片 ---- */
.identity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f8f8fa;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.identity-item:active {
  background-color: #f0f0f4;
  transform: scale(0.98);
}

/* 头像 */
.identity-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #e8e8ee 0%, #d8d8e0 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.identity-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.identity-item__avatar svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.7);
}

/* 文字区 */
.identity-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.identity-item__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-item__sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右侧箭头 */
.identity-item__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-hint);
  opacity: 0.4;
}
