.paper-receipts-page {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.paper-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.13), transparent 32%), #ffffff;
}

.paper-kicker {
  margin: 0 0 4px;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.paper-hero-card h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.paper-hero-card p {
  margin: 6px 0 0;
  color: #6d7788;
  font-weight: 700;
}

.paper-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
  max-width: 100%;
}

.paper-side-card {
  position: sticky;
  top: 16px;
}

.paper-mini-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.paper-mini-summary > div {
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  padding: 12px;
  background: #fbfcfe;
}

.paper-mini-summary span {
  display: block;
  color: #6d7788;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.paper-mini-summary b {
  font-size: 20px;
  color: #152033;
}

.paper-search-panel {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 130px 135px 125px 125px 80px 120px 150px;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.paper-search-panel input,
.paper-search-panel select,
.paper-search-panel button {
  min-width: 0;
  width: 100%;
}

.paper-export-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 10px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  width: 100%;
}

.paper-export-btn.excel {
  background: #16803a;
}

.paper-export-btn.zip {
  background: #7c3aed;
}

.paper-export-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#paperBillTableWrap {
  max-width: 100%;
  overflow: hidden;
}

.paper-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid #e3e8f1;
  border-radius: 14px;
  background: #fff;
}

.paper-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.paper-table th,
.paper-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
  padding: 8px 5px;
}

.paper-table .right {
  text-align: right;
  white-space: normal;
}

.paper-category-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f0ff;
  color: #6d28d9;
  font-weight: 900;
  font-size: 12px;
  white-space: normal;
}

.attachment-picker {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 96px 70px;
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.attachment-preview {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #ccd3dd;
  background: #fbfcfe;
  color: #64748b;
  line-height: 1.45;
  max-width: 100%;
  overflow: hidden;
}

.attachment-preview.ok {
  border-color: #8ed5a8;
  background: #f0fff5;
  color: #167a3a;
}

.attachment-preview-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 10px;
  min-width: 0;
}

.attachment-preview-title {
  color: #167a3a;
  font-size: 15px;
  font-weight: 900;
}

.attachment-file-name {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-status {
  display: inline-block;
  width: fit-content;
  background: #e8f6ee;
  color: #167a3a;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.attachment-image-frame {
  width: 100%;
  max-width: 360px;
  max-height: 280px;
  border: 1px solid #d7e2d9;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-image-preview {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #fff;
}

.attachment-file-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #d7e2d9;
  border-radius: 12px;
  padding: 10px;
  color: #30415c;
}

.attachment-file-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eef6ff;
  color: #0b5f99;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.button-group button,
.small-btn {
  width: 100%;
  padding: 7px 6px;
  font-size: 12px;
  border: 0;
  border-radius: 8px;
  background: #0b83d8;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.small-text {
  color: #6d7788;
  font-size: 12px;
  margin-top: 3px;
  word-break: break-word;
}

.muted {
  color: #7b8797;
  font-size: 12px;
}

.empty-box {
  border: 1px dashed #ccd3dd;
  padding: 14px;
  border-radius: 10px;
  color: #666;
  background: #fff;
}

.paper-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.paper-pagination button {
  min-width: 38px;
  border: 1px solid #b9d9f5;
  border-radius: 8px;
  background: #e8f3ff;
  color: #0b5f99;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.paper-pagination button.active {
  background: #0b83d8;
  color: #fff;
}

.paper-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .paper-layout,
  .paper-search-panel,
  .attachment-picker {
    grid-template-columns: 1fr;
  }

  .paper-side-card {
    position: static;
  }

  .summary-actions {
    justify-content: stretch;
  }

  .summary-actions button {
    width: 100%;
  }

  .attachment-image-frame {
    max-width: 100%;
  }
}
