.np-documents {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
  scrollbar-width: thin;
}
.np-document-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 14px;
  border: 1px solid #d4e0e9;
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}
.np-document-card > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}
.np-document-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}
.np-document-meta,
.np-document-counts {
  color: #536a7d;
  font-size: 0.8rem;
  margin: 4px 0;
}
.np-document-warning {
  color: #705118;
  background: #fff7e4;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 5px 0;
  flex-basis: 100%;
}
.np-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.np-document-actions button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.8rem;
  margin: 0;
}
.np-document-notice {
  flex-basis: 100%;
  margin: 0;
  color: #4b6276;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.np-document-notice:empty {
  display: none;
}
.np-document-job {
  display: block;
}
.np-document-job .np-document-actions {
  margin-top: 8px;
}
.np-document-job progress {
  width: 100%;
  height: 8px;
  margin: 5px 0;
  accent-color: #278fb4;
}
.np-document-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px;
  border: 1px solid #d5e0e8;
  border-radius: 18px;
}
.np-document-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.np-document-dialog-header h2 {
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.np-document-dialog-header button {
  margin: 0;
  min-height: 44px;
  flex-shrink: 0;
}
.np-document-dialog form label {
  display: grid;
  gap: 6px;
}
.np-document-dialog input {
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bacbd8;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}
.np-document-dialog button {
  min-height: 44px;
}
.np-document-preview {
  margin-top: 12px;
}
.np-document-preview details {
  padding: 10px 0;
  border-bottom: 1px solid #e1e8ee;
}
.np-document-preview summary {
  min-height: 32px;
  cursor: pointer;
  color: #193c58;
}
.np-document-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 10px 0;
}
.np-documents :focus-visible,
.np-document-dialog :focus-visible {
  outline: 3px solid #277eae;
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .np-documents {
    max-height: 260px;
  }
  .np-document-card {
    padding: 10px;
  }
  .np-document-actions {
    width: 100%;
  }
  .np-document-actions button {
    flex: 1 1 auto;
    min-height: 44px;
  }
  .np-document-dialog {
    padding: 15px;
  }
  .np-document-dialog-header h2 {
    font-size: 1.15rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .np-documents *,
  .np-document-dialog * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.np-document-analysis-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.document-attachments { margin:10px 0; border:1px solid #d4e0e9; border-radius:12px; padding:8px 10px; background:#f9fbfd; }
.document-attachments summary { cursor:pointer; min-height:40px; display:list-item; line-height:40px; font-size:.85rem; color:#23455f; }
