/* 用户中心页面 —— 基础信息 / API Key 管理 / 调用用量（PC） */

.uc-page {
  min-height: calc(100vh - 64px);
  background: #F5F7FA;
}

.uc-layout {
  display: flex;
  max-width: 1440px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  background: #fff;
}

/* ==================== 左侧栏 ==================== */

.uc-side {
  width: 224px;
  flex-shrink: 0;
  padding: 24px 16px;
  background: #fff;
  border-right: 1px solid #EFF2F5;
}

.uc-side-label {
  padding: 0 12px 12px;
  font-size: 12px;
  color: #98A2B3;
}

.uc-side-link {
  display: flex;
  align-items: center;
  height: 40px;
  margin-bottom: 4px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #344054;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.uc-side-link:hover {
  background: #F5F7FA;
  color: #1C64FD;
}

.uc-side-link.active {
  background: #E8F0FF;
  color: #1C64FD;
  font-weight: 600;
}

/* ==================== 右侧内容 ==================== */

.uc-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 64px;
  background: #F5F7FA;
}

.uc-head {
  margin-bottom: 20px;
}

.uc-head h1 {
  font-size: 22px;
  font-weight: 600;
  color: #101828;
  line-height: 1.4;
}

.uc-head p {
  margin-top: 6px;
  font-size: 13px;
  color: #667085;
}

.uc-card {
  background: #fff;
  border: 1px solid #EFF2F5;
  border-radius: 8px;
  padding: 20px 24px;
}

.uc-label {
  margin-bottom: 8px;
  font-size: 12px;
  color: #98A2B3;
}

.uc-note {
  margin-top: 8px;
  font-size: 12px;
  color: #98A2B3;
  line-height: 1.6;
}

.uc-big {
  font-size: 26px;
  font-weight: 700;
  color: #101828;
  line-height: 1.3;
}

.uc-big em {
  font-style: normal;
  font-size: 14px;
  font-weight: 400;
  color: #667085;
}

.uc-sub {
  font-size: 12px;
  color: #667085;
  line-height: 1.6;
}

/* ---------- 基础信息 ---------- */

.uc-profile-card {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #EEF4FF 0%, #FFFFFF 60%);
}

.uc-profile-user {
  display: flex;
  align-items: center;
  width: 300px;
  flex-shrink: 0;
  padding-right: 24px;
}

.uc-avatar {
  width: 48px;
  height: 48px;
  margin-right: 14px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #1C64FD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
}

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

.uc-profile-name {
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 6px;
}

.uc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: #FFF4E5;
  color: #B54708;
  font-size: 12px;
}

.uc-badge.is-formal {
  background: #E8F0FF;
  color: #1C64FD;
}

.uc-profile-item {
  flex: 1;
  min-width: 0;
  padding: 0 24px;
  border-left: 1px solid #E4E7EC;
}

.uc-profile-item .uc-value {
  font-size: 14px;
  color: #101828;
  word-break: break-all;
}

.uc-profile-item .uc-value .muted {
  color: #667085;
}

.uc-copy {
  margin-left: 8px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #1C64FD;
  cursor: pointer;
}

.uc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.uc-cards .uc-card {
  min-height: 168px;
}

.uc-bar {
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  background: #EFF2F5;
  overflow: hidden;
}

.uc-bar i {
  display: block;
  height: 100%;
  background: #F79009;
  border-radius: 3px;
}

/* ---------- 服务支持 ---------- */

.uc-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px dashed #E4E7EC;
}

.uc-h3 {
  font-size: 16px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 6px;
}

.uc-hotline {
  text-align: right;
  flex-shrink: 0;
  margin-left: 24px;
}

.uc-hotline span {
  display: block;
  font-size: 12px;
  color: #98A2B3;
  margin-bottom: 4px;
}

.uc-hotline strong {
  font-size: 22px;
  color: #1C64FD;
  font-weight: 600;
}

.uc-hotline em {
  font-style: normal;
  font-size: 12px;
  color: #667085;
}

.uc-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.uc-support-item {
  padding: 18px 20px;
  border: 1px solid #E4E7EC;
  border-radius: 8px;
  background: #FCFCFD;
}

.uc-support-item .uc-item-title {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 8px;
}

.uc-support-item .uc-item-title .uc-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #1C64FD;
}

.uc-support-item .uc-item-desc {
  font-size: 12px;
  color: #667085;
  line-height: 1.7;
}

.uc-support-item .uc-item-action {
  margin-top: 16px;
  text-align: right;
}

/* ==================== 通用按钮 ==================== */

.uc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #D0D5DD;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.uc-btn:hover {
  border-color: #1C64FD;
  color: #1C64FD;
}

.uc-btn-primary {
  border-color: #1C64FD;
  background: #1C64FD;
  color: #fff;
}

.uc-btn-primary:hover {
  background: #0E52E5;
  border-color: #0E52E5;
  color: #fff;
}

.uc-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 4px;
}

.uc-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== API Key 管理 ==================== */

.uc-tip {
  display: flex;
  align-items: flex-start;
  padding: 14px 18px;
  margin-bottom: 16px;
  border: 1px solid #D6E4FF;
  border-radius: 8px;
  background: #F0F5FF;
  font-size: 13px;
  color: #344054;
  line-height: 1.7;
}

.uc-tip .uc-icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  flex-shrink: 0;
  color: #1C64FD;
}

.uc-tip strong {
  color: #101828;
}

.uc-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.uc-toolbar .uc-grow {
  flex: 1;
}

.uc-search {
  width: 280px;
  max-width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #D0D5DD;
  border-radius: 6px;
  font-size: 14px;
  color: #101828;
  outline: none;
}

.uc-search:focus {
  border-color: #1C64FD;
}

.uc-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #D0D5DD;
  border-radius: 6px;
  font-size: 14px;
  color: #101828;
  outline: none;
}

.uc-input:focus {
  border-color: #1C64FD;
}

.uc-empty {
  padding: 56px 24px;
  border: 1px dashed #D6E4FF;
  border-radius: 8px;
  background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 100%);
  text-align: center;
}

.uc-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: #1C64FD;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
}

.uc-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 8px;
}

.uc-empty-desc {
  font-size: 13px;
  color: #667085;
  margin-bottom: 18px;
}

/* ---------- 表格 ---------- */

.uc-table {
  background: #fff;
  border: 1px solid #EFF2F5;
  border-radius: 8px;
  overflow: hidden;
}

.uc-table table {
  width: 100%;
  border-collapse: collapse;
}

.uc-table th {
  padding: 14px 20px;
  background: #F9FAFB;
  font-size: 13px;
  font-weight: 500;
  color: #667085;
  text-align: left;
  white-space: nowrap;
}

.uc-table td {
  padding: 16px 20px;
  border-top: 1px solid #EFF2F5;
  font-size: 13px;
  color: #344054;
  vertical-align: middle;
}

.uc-table tr:hover td {
  background: #FCFCFD;
}

.uc-key-name {
  color: #101828;
  font-weight: 500;
}

.uc-key-code {
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  color: #344054;
}

.uc-status {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #067647;
}

.uc-status::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #17B26A;
}

.uc-status.is-off {
  color: #667085;
}

.uc-status.is-off::before {
  background: #98A2B3;
}

.uc-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  background: #ECFDF3;
  color: #067647;
  font-size: 12px;
}

.uc-status-badge.is-off {
  background: #F2F4F7;
  color: #667085;
}

/* 操作列：始终单行排列，避免列宽不足时竖排换行 */
.uc-ops {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.uc-op {
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  line-height: 20px;
  color: #1C64FD;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}

.uc-op:hover {
  opacity: 0.75;
}

.uc-op.is-danger {
  color: #D92D20;
}

.uc-op:disabled {
  color: #98A2B3;
  cursor: not-allowed;
}

/* ==================== 调用用量 ==================== */

.uc-quick {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #D0D5DD;
  border-radius: 6px;
  background: #fff;
}

.uc-quick button {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 4px;
  background: none;
  font-size: 13px;
  color: #667085;
  cursor: pointer;
}

.uc-quick button.active {
  background: #1C64FD;
  color: #fff;
}

.uc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.uc-stat {
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #EFF2F5;
  border-radius: 8px;
}

.uc-stat .uc-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #101828;
}

.uc-stat .uc-stat-label {
  margin-top: 6px;
  font-size: 12px;
  color: #667085;
}

.uc-stat.is-primary {
  background: linear-gradient(135deg, #1C64FD 0%, #3B82F6 100%);
  border-color: #1C64FD;
}

.uc-stat.is-primary .uc-stat-value,
.uc-stat.is-primary .uc-stat-label {
  color: #fff;
}

.uc-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 20px;
  border-top: 1px solid #EFF2F5;
  font-size: 13px;
  color: #667085;
}

.uc-pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #D0D5DD;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

.uc-pager button.active {
  border-color: #1C64FD;
  background: #1C64FD;
  color: #fff;
}

.uc-pager button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.uc-empty-row {
  padding: 48px 20px !important;
  text-align: center;
  color: #98A2B3;
}

/* ==================== 弹窗 ==================== */

.uc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.uc-modal.is-open {
  display: block;
}

.uc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.uc-modal-dialog {
  position: relative;
  width: 560px;
  max-width: calc(100vw - 32px);
  margin: 12vh auto 0;
  padding: 24px 28px 28px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(16, 24, 40, 0.18);
}

.uc-modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  color: #101828;
}

.uc-modal-close {
  padding: 0;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #98A2B3;
  cursor: pointer;
}

.uc-modal-tip {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #F0F5FF;
  font-size: 13px;
  color: #344054;
  line-height: 1.7;
}

.uc-form {
  margin-top: 18px;
}

.uc-form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
}

.uc-form-row > label {
  width: 104px;
  flex-shrink: 0;
  padding-top: 9px;
  font-size: 13px;
  color: #344054;
  text-align: right;
  padding-right: 12px;
}

.uc-form-row .uc-form-control {
  flex: 1;
  min-width: 0;
}

.uc-form-row .uc-input,
.uc-form-row textarea {
  width: 100%;
  box-sizing: border-box;
}

.uc-form-row textarea {
  min-height: 96px;
  padding: 9px 12px;
  border: 1px solid #D0D5DD;
  border-radius: 6px;
  font-size: 14px;
  color: #101828;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.uc-form-row textarea:focus {
  border-color: #1C64FD;
}

.uc-required {
  color: #D92D20;
  margin-right: 2px;
}

.uc-modal-actions {
  margin-top: 24px;
}

.uc-modal-actions .uc-btn {
  width: 100%;
  height: 42px;
}

.uc-hotline-inline {
  margin-top: 14px;
  font-size: 12px;
  color: #667085;
}

.uc-hotline-inline strong {
  color: #1C64FD;
  font-weight: 500;
}

/* ==================== 提示 ==================== */

.uc-toast {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 1100;
  transform: translateX(-50%) translateY(-12px);
  padding: 10px 18px;
  border-radius: 6px;
  background: rgba(16, 24, 40, 0.9);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}

.uc-toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.uc-toast.is-error {
  background: #D92D20;
}
