/**
 * Vaulten — 업로드 파일 한 줄 요약 (Sales, Pawn 공용)
 */
.v1-attach-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.v1-attach-list--rich {
  gap: 10px;
}

.v1-attach-empty {
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  background: #fafbfc;
  line-height: 1.45;
}

.v1-attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v1-attach-item--rich {
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.v1-attach-item--new {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.v1-attach-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v1-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v1-attach-thumb--pdf {
  background: #fef2f2;
  border-color: #fecaca;
}

.v1-attach-thumb--file {
  background: #f1f5f9;
}

.v1-attach-thumb__badge {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
}

.v1-attach-thumb--pdf .v1-attach-thumb__badge {
  color: #b91c1c;
}

.v1-attach-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.v1-attach-filename {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v1-attach-summary {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.v1-attach-summary--missing {
  border-color: #f87171;
  background: #fff7f7;
}

.v1-attach-summary::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.v1-attach-summary:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}

.v1-attach-summary--missing:focus {
  outline-color: #fca5a5;
  border-color: #f87171;
}

.v1-attach-label-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
}

.v1-attach-item__remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
}

.v1-attach-item__remove:hover {
  color: #b91c1c;
}

.sales-attach-list.v1-attach-list,
.sales-uploaded-files.v1-attach-list {
  border: none;
  background: transparent;
  padding: 0;
  min-height: 0;
}

.sales-attach-list.v1-attach-list:empty::before,
.sales-uploaded-files.v1-attach-list:empty::before {
  content: none;
}

/* Pawn staff — upload preview modal */
.pawn-doc-preview-modal[hidden] {
  display: none !important;
}

.pawn-doc-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.pawn-doc-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.pawn-doc-preview-modal__box {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pawn-doc-preview-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.pawn-doc-preview-modal__label {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.pawn-doc-preview-modal__fname {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  word-break: break-all;
}

.pawn-doc-preview-modal__close {
  border: none;
  background: #f1f5f9;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pawn-doc-preview-modal__body {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: calc(88vh - 120px);
  overflow: auto;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.pawn-doc-preview-modal__img {
  max-width: 100%;
  max-height: calc(88vh - 140px);
  object-fit: contain;
  border-radius: 6px;
}

.pawn-doc-preview-modal__iframe {
  width: 100%;
  min-height: 70vh;
  border: none;
  background: #fff;
}

.pawn-doc-preview-modal__foot {
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}

.pawn-doc-preview-modal__foot a {
  color: #0369a1;
  text-decoration: none;
  font-weight: 600;
}

.pawn-doc-preview-modal__foot a:hover {
  text-decoration: underline;
}
