/* FileHub - Profile page styles
   自适应移动端与桌面端，卡片化 + 表格在小屏转为卡片行 */

.profile .page-header { margin: 6px 28px 12px; }
.profile .page-header .sub { color: #6b7280; font-size: 14px; }

/* 卡片容器（与全局统一） */
.profile .card {
  background: #fff;
  /* border: 1px solid #e5e7eb; */
  border-radius: 28px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  padding: 28px;
  margin-bottom: 12px;
}
.profile{
        margin:auto;
        max-width: 800px;
}

/* 信息栅格 */
.profile .grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 16px;
}
.profile .grid-3 .label { color: #6b7280; font-size: 13px; }
.profile .grid-3 .value { font-weight: 600; color: #111827; }

/* 操作区域 */
.profile .actions h4 { margin-bottom: 10px; margin-left: 28px;}
.profile .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.profile .panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border: 1px dashed #d1d5db;
  border-radius: 28px;
  background: #fafafa;
}
.profile .panel input[type="text"],
.profile .panel input[type="password"] { width: 100%; }
.profile .panel .btn.primary {
  width: 100%;
  padding: 10px 14px;
  font-weight: 600;
  border-radius: 28px;
}

/* 统计模块 */
.profile .stats h4 { margin-bottom: 10px; margin-left: 28px;}
.profile .stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.profile .stat {
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #f8fafc;
  padding: 12px;
}
.profile .stat .k { color: #6b7280; font-size: 13px; }
.profile .stat .v { font-size: 22px; font-weight: 700; color: #111827; }

/* 列表表格 */
.profile .table-wrap { width: 100%; overflow-x: hidden; }
.profile .fh-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.profile .fh-table th, .profile .fh-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
  max-width: 100%;
  word-break: break-word;
}
.profile .fh-table thead th { background: #f6f8fa; font-weight: 600; }
.profile .fh-table .empty td { text-align: center; color: #9ca3af; }

/* 移动端：表格卡片化，无横向滚动 */
@media (max-width: 768px) {
  .profile .grid-3 { grid-template-columns: 1fr; }
  .profile .grid-2 { grid-template-columns: 1fr; }
  .profile .stat-grid { grid-template-columns: 1fr; }

  .profile .fh-table thead { display: none; }
  .profile .fh-table, .profile .fh-table tbody, .profile .fh-table tr, .profile .fh-table td {
    display: block; width: 100%;
  }
  .profile{
        margin:10px 20px;
}
  .profile .fh-table tr {
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 10px;
    margin-bottom: 10px;
  }
  .profile .fh-table td {
    border: none;
    padding: 6px 0;
    position: relative;
  }
  /* 如果后端输出了 data-label，可展示“键:值”；否则保持纯文本 */
  .profile .fh-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 5em;
    font-weight: 600;
    color: #6b7280;
    margin-right: 6px;
  }
  .profile .table-wrap { overflow-x: hidden; }
}

/* 桌面端小优化 */
@media (min-width: 769px) {
  .profile .fh-table td[data-label="文件名"] {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* === 基本信息卡片（Profile Info）=== */
.profile .card.info{
  padding: 20px 24px;
  /* border-radius: 14px; */
  background: #fff;
  box-shadow: 0 8px 24px rgba(31,35,41,.04);
  border: 1px solid #eef1f4;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* 自适应网格：桌面四列，平板两列，手机一列 */
.profile .card.info .grid-4{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1024px){
  .profile .card.info .grid-4{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
@media (max-width: 560px){
  .profile .card.info .grid-4{
    grid-template-columns: 1fr;
  }
}

/* 每一项的块样式 */
.profile .card.info .item{
  padding: 16px 18px;
  border-radius: 28px;
  background: #fafbfc;
  border: 1px solid #edf0f3;
  transition: background .2s ease, border-color .2s ease, transform .06s ease;
  min-width: 0;
}
.profile .card.info .item:hover{
  background: #f7f9fb;
  border-color: #e6eaee;
}

/* 标签与数值 */
.profile .card.info .label{
  font-size: 13px;
  color: #6b7280;
  letter-spacing: .02em;
  margin-bottom: 8px;
}
.profile .card.info .value{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 20px;
  line-height: 1.35;
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
  min-width: 0;
}

/* 账号ID 用等宽字体更清晰 */
#pf-account{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: .02em;
}

/* 状态徽章（通用） */
.profile .badge{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: #eef2ff;
  color: #1d4ed8;
  border: 1px solid #e4e8ff;
}
.profile .badge{ white-space: nowrap; }

/* 如果你在别处已经给状态加了类名，可获得更细的色彩区分（可选） */
.profile .badge.active{
  background: #ecfdf5;
  color: #059669;
  border-color: #c6f7e2;
}
.profile .badge.disabled{
  background: #f4f4f5;
  color: #52525b;
  border-color: #e7e7ea;
}
.profile .badge.departed{
  background: #fff7ed;
  color: #ea580c;
  border-color: #ffe7d3;
}

/* 上方描述文字行距稍微放大点，视觉更轻松 */
.profile .page-header .sub{
  margin-top: 6px;
  color: #6b7280;
  line-height: 1.7;
}

/* 统一按钮在这块区域里的视觉（保持你现有btn色系） */
.profile .card.info .btn{
  border-radius: 10px;
}

/* 让卡片与下方内容有更清晰的分隔 */
.profile .card.info + .card{
  margin-top: 18px;
}