/* Shared attachment layout: file names may shrink, actions must always keep their own space. */
.admin-panel .file-card {
  width: min(520px, 100%);
  min-height: 64px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(38, 73, 112, .06);
  box-sizing: border-box;
}
.admin-panel .file-card-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #2868ff;
  font-size: 18px;
}
.admin-panel .file-card-info,
.lawyer-detail .lawyer-file > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-panel .file-card-info strong,
.lawyer-detail .lawyer-file strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3e4856;
  font-size: 13px;
  font-weight: 400;
}
.admin-panel .file-card-info small,
.lawyer-detail .lawyer-file small {
  display: block;
  min-width: 0;
  margin: 0;
  color: #9aa4b2;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}
.admin-panel .task-file-download,
.lawyer-detail .lawyer-file-download,
.owner-page .post-detail-card .task-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 70px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #cfe0ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #f7faff;
  color: #2868ff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.admin-panel .task-file-download span,
.lawyer-detail .lawyer-file-download span,
.owner-page .post-detail-card .task-download span {
  font-size: 16px;
  line-height: 1;
}
.admin-panel .task-file-download:hover,
.lawyer-detail .lawyer-file-download:hover,
.owner-page .post-detail-card .task-download:hover {
  border-color: #2868ff;
  background: #2868ff;
  color: #fff;
}
.owner-page .post-detail-card .task-attachment {
  width: min(520px, 100%);
  min-height: 72px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 10px 12px;
}
.owner-page .post-detail-card .task-attachment-preview {
  display: block;
  width: 92px;
  height: 52px;
  overflow: hidden;
  border: 1px solid #e5e8ed;
  border-radius: 5px;
  background: #fff;
}
.owner-page .post-detail-card .task-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}
.owner-page .post-detail-card .task-attachment-name {
  min-width: 0;
}
.owner-page .post-detail-card .task-detail-proof .task-attachment {
  width: 104px;
  min-height: 90px;
  display: block;
  padding: 4px;
}
.owner-page .post-detail-card .task-detail-proof .task-attachment-preview {
  width: 92px;
  height: 80px;
}
.owner-page .post-detail-card .task-detail-proof .task-attachment-name,
.owner-page .post-detail-card .task-detail-proof .task-download {
  display: none;
}
.lawyer-detail .lawyer-file {
  width: min(520px, 100%);
  min-height: 64px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(38, 73, 112, .06);
  box-sizing: border-box;
}
.lawyer-detail .lawyer-file > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #2868ff;
  font-size: 18px;
}
.admin-panel .file-card > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #cfe0ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #f7faff;
  color: #2868ff;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.admin-panel .file-card > button:hover {
  border-color: #2868ff;
  background: #2868ff;
  color: #fff;
}
@media (max-width: 600px) {
  .admin-panel .file-card,
  .lawyer-detail .lawyer-file {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .owner-page .post-detail-card .task-attachment {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .owner-page .post-detail-card .task-attachment-preview {
    width: 72px;
    height: 52px;
  }
  .admin-panel .task-file-download,
  .admin-panel .file-card > button,
  .lawyer-detail .lawyer-file-download,
  .owner-page .post-detail-card .task-download {
    grid-column: 2;
    justify-self: start;
    margin-top: 7px;
  }
}
