/* 个人中心 - 扁平简约风格 */

.profile-main {
  padding: 2rem 0 4rem;
  background: var(--bg);
  min-height: calc(100vh - 64px - 150px);
}

/* 用户概览 */
.profile-overview {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  color: #fff;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.overview-info h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.overview-info p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

/* 内容区 */
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 区块 */
.profile-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.btn-text:hover {
  color: var(--accent-dark);
}

/* 信息网格 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.info-item {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.info-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* 编辑表单 */
.edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.edit-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.edit-row label {
  width: 50px;
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.edit-row .form-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: calc(50px + 0.75rem);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

/* 订单列表 */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: transform 0.2s;
}

.order-item:hover {
  transform: translateX(4px);
}

.order-info {
  flex: 1;
}

.order-title {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.order-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-right {
  text-align: right;
}

.order-price {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.order-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.order-status--completed {
  background: #d1fae5;
  color: #059669;
}

.order-status--pending {
  background: #fef3c7;
  color: #d97706;
}

/* ==================== 我的激活码 — 清爽简约设计 ==================== */

.profile-section--licenses {
  padding: 1.25rem;
}

.section-title--licenses {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title--licenses h2 {
  font-size: 1rem;
  margin: 0;
}

.section-title--licenses .section-hint {
  margin-left: auto;
  font-size: 0.85rem;
  color: #728aa5;
}

/* 激活码网格 */
.license-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* ====== 激活码卡片 - 清爽风格 ====== */
.license-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02);
  border: 1px solid #f0f3f7;
  transition: all 0.15s ease;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-card:hover {
  border-color: #d0ddee;
  box-shadow: 0 12px 20px -8px rgba(26, 67, 113, 0.06);
}

/* 左侧信息区 */
.license-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 24px;
  flex: 1;
  min-width: 0;
}

/* 产品名称 + 版本 */
.license-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-badge {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #0b1e32;
}

.product-version {
  background: #eef3fc;
  padding: 4px 10px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1f4975;
  text-transform: uppercase;
}

/* 激活码显示 */
.license-code {
  font-family: 'DM Sans', 'Noto Sans SC', monospace;
  font-weight: 500;
  font-size: 0.9rem;
  background: #f8faff;
  padding: 6px 14px;
  border-radius: 40px;
  color: #1e3b5c;
  border: 1px solid #e6ecf5;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.license-code:hover {
  background: #f0f5fe;
  border-color: #d0ddee;
}

.license-code i {
  opacity: 0.6;
  font-style: normal;
  font-size: 0.8rem;
}

/* 中间元信息 */
.license-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #4a5f7a;
}

.license-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  background: #fbfdff;
  padding: 4px 10px;
  border-radius: 30px;
  color: #3e5e7e;
}

/* 状态标签 */
.license-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 40px;
  background: #eaf6e7;
  color: #1e7b48;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.license-status--active {
  background: #eaf6e7;
  color: #1e7b48;
}

.license-status--unused {
  background: #fef3c7;
  color: #b45309;
}

.license-status--used {
  background: #f3f4f6;
  color: #6b7280;
}

.license-status--expired {
  background: #fff1f0;
  color: #b13e3e;
}

.license-status--disabled {
  background: #fffbeb;
  color: #b45309;
}

/* 右侧操作按钮 */
.license-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  background: transparent;
  border: none;
  border-radius: 40px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d7188;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1.2rem;
}

.icon-btn:hover {
  background: #f0f5fe;
  color: #1f4975;
}

.icon-btn.copied {
  color: #1e7b48;
}

/* 空状态 */
.empty-state--licenses {
  text-align: center;
  padding: 36px 20px;
  background: #fafcff;
  border-radius: 28px;
  border: 1px dashed #d9e2ef;
}

.empty-state--licenses p {
  color: #5b7393;
  margin-bottom: 16px;
}

/* ====== 响应式设计 ====== */
@media (max-width: 768px) {
  .profile-section--licenses {
    padding: 1rem;
  }

  .license-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
  }

  .license-info {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .license-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .license-actions {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .license-card {
    border-radius: 14px;
  }

  .product-badge {
    font-size: 0.95rem;
  }

  .license-date {
    font-size: 0.8rem;
  }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .profile-overview {
    padding: 1.5rem;
  }

  .avatar {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .overview-info h1 {
    font-size: 1.15rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-right {
    text-align: left;
  }

  .edit-actions {
    margin-left: 0;
  }
}

/* 更换手机号弹窗 */
.phone-change-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.phone-change-modal .modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 90%;
  max-width: 400px;
}

.phone-change-modal h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

.phone-change-modal .edit-row {
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.phone-change-modal .edit-row label {
  width: 70px;
  flex-shrink: 0;
}

.phone-change-modal .input-with-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
}

.phone-change-modal .input-with-btn .form-input {
  flex: 1;
  min-width: 0;
}

.phone-change-modal .btn-code {
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  flex-shrink: 0;
}

.phone-change-modal .btn-code:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.phone-change-modal .btn-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-muted);
}

.phone-change-modal .edit-actions {
  margin-left: 0;
  margin-top: 1rem;
  justify-content: flex-end;
}
