.customs-workspace { --customs-border: #d8d4ca; }
.customs-workspace h3 { margin: 0; font-size: 17px; }
.customs-input-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: start; }
.customs-input-grid > div { min-width: 0; }
.customs-pi-dropzone { display: grid; gap: 10px; padding: 24px; border: 2px dashed #b8c9c4; border-radius: 8px; background: #f6faf8; text-align: center; cursor: pointer; }
.customs-pi-dropzone span { color: var(--muted); font-size: 13px; }
.customs-pi-dropzone.is-dragging, .customs-pi-dropzone:focus-visible { border-color: #14756d; background: #eaf6f1; outline: 2px solid #14756d; outline-offset: 2px; }
.customs-pi-dropzone[aria-disabled="true"] { cursor: wait; opacity: 0.7; }
.customs-import-source, .customs-import-warnings { margin: 0; overflow-wrap: anywhere; }
.customs-import-warnings { padding-left: 20px; font-size: 13px; color: #75521b; }
.customs-field { display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.customs-field > span { color: var(--muted); }
.customs-field input, .customs-field select, .customs-field textarea,
.customs-items select, .customs-extra > textarea {
  width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--customs-border);
  border-radius: 5px; color: var(--ink); background: var(--panel); font: inherit;
}
.customs-field textarea, .customs-extra > textarea { resize: vertical; }
.customs-field input[readonly] { background: var(--panel-soft); }
.customs-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.customs-check { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 7px 0; }
.customs-check input { width: 17px; height: 17px; flex-shrink: 0; }
.customs-extra { border: 1px solid var(--customs-border); border-radius: 6px; padding: 14px; }
.customs-extra summary { cursor: pointer; font-weight: 600; }
.customs-extra[open] summary { margin-bottom: 14px; }
.customs-items { min-width: 1320px; table-layout: fixed; }
.customs-items th:first-child { width: 55px; }
.customs-items th:nth-child(2) { width: 160px; }
.customs-items th:nth-child(3) { width: 310px; }
.customs-items th:last-child { width: 115px; }
.customs-items td { vertical-align: top; white-space: normal; }
.customs-items td .customs-field + .customs-field, .customs-items td select { margin-top: 8px; }
.customs-items td .btn { margin-bottom: 8px; padding: 8px; }
.customs-items td > span { display: block; margin-top: 7px; }
.customs-preview { background: white; color: #222; }
.customs-preview h2 { text-align: center; }
.customs-paper-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #777; border-left: 1px solid #777; }
.customs-paper-meta > div { border-right: 1px solid #777; border-bottom: 1px solid #777; padding: 9px; overflow-wrap: anywhere; }
.customs-paper-items { min-width: 1000px; }
.customs-paper-items td { white-space: pre-wrap; }
.customs-preview > p { white-space: pre-wrap; }
@media (max-width: 1500px) { .customs-input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 950px) { .customs-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .customs-input-grid { grid-template-columns: 1fr; } }
@media (max-width: 850px) {
  .customs-paper-meta { grid-template-columns: 1fr; }
  .customs-workspace .card-head { flex-wrap: wrap; gap: 10px; }
}
