.ap-view {min-width: 0}
.ap-heading {display: flex; align-items: center; justify-content: space-between; gap: 16px}
.ap-view .primary-button {flex-shrink: 0; min-height: 44px}
.ap-filters, .ap-fields {display: grid; gap: 18px; align-items: start}
.ap-filters {grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(115px, 1fr))}
.ap-fields {grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px}
.ap-wide {grid-column: 1 / -1}
.ap-filters label, .ap-fields label {display: grid; gap: 6px; font-size: .87rem; font-weight: 500}
.ap-filters input, .ap-fields input, .ap-view select, .ap-fields textarea {
  display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid #b9b5aa; border-radius: 2px; background-color: #fffcf6; color: var(--ink);
  font: 400 1rem/1.4 "DM Sans", Arial, sans-serif;
}
.ap-fields textarea {resize: vertical}
.ap-view select {
  appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23322e25' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ap-fields small {font-size: .78rem; font-weight: 400; color: var(--muted)}
.ap-list-meta {display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 12px; color: var(--muted); font-size: .85rem}
.ap-clear {border: none; background: transparent; padding: 10px 0 10px 10px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px}
.ap-table {border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem}
.ap-table thead th {font-weight: 500; color: var(--muted); font-size: .8rem; background: #f0ede4; border-block: 1px solid var(--line)}
.ap-table td, .ap-table th {padding: 10px 12px; vertical-align: middle}
.ap-table tbody th {text-align: left; font-weight: 500}
.ap-table tbody tr {border-bottom: 1px solid var(--line)}
.ap-table tbody tr:last-child {border-bottom: 0}
.ap-item {display: flex; align-items: center; gap: 14px; line-height: 1.35; overflow-wrap: anywhere}
.ap-item img {flex: none; width: 54px; height: 54px; object-fit: cover}
.ap-item:hover span {text-decoration: underline; text-underline-offset: 4px}
.ap-row-price {font-variant-numeric: tabular-nums; white-space: nowrap}
.ap-state {display: inline-flex; padding: 3px 9px; border-radius: 2px; font-size: .78rem}
.ap-active {background: #dfe8d9; color: #354c32}
.ap-draft {background: #eee6d7; color: #5d513c}
.ap-empty {padding: 40px 16px; border-top: 1px solid var(--line); text-align: center; color: var(--muted)}
.ap-notice, .ap-error {padding: 12px 16px; margin: 0 0 16px; overflow-wrap: anywhere}
.ap-notice {background: #e4ebde; color: #33462d}
.ap-error {background: #f1ded6; color: #782e20}
.ap-form {display: grid; gap: 24px}
.ap-section {min-width: 0; margin: 0; padding: 18px clamp(16px, 2vw, 32px) 26px}
.ap-section legend {padding: 0 7px; margin-left: -7px; font: 400 1.7rem/1.2 var(--serif)}
.ap-photos {display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px}
.ap-option {position: relative; display: grid; gap: 7px; align-content: start; cursor: pointer; font-size: .85rem; font-weight: 500}
.ap-option img {width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 3px solid transparent}
.ap-option input {position: absolute; left: 9px; top: 9px; margin: 0; width: 18px; height: 18px; accent-color: var(--olive)}
.ap-option input:checked + img {border-color: var(--olive)}
.ap-option input:focus-visible + img {outline: 2px solid var(--olive); outline-offset: 2px}
.ap-form-actions {display: flex; gap: 24px; align-items: center}
.ap-accessible {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap}
@media (max-width: 1100px) {
  .ap-table td, .ap-table th {padding-inline: 8px}
  .ap-filters {grid-template-columns: repeat(2, minmax(0, 1fr))}
  .ap-filters label:first-child {grid-column: 1 / -1}
}
@media (max-width: 740px) {
  .ap-photos {grid-template-columns: repeat(3, minmax(0, 1fr))}
  .ap-table thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%)}
  .ap-table, .ap-table tbody {display: block}
  .ap-table tbody tr {display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; align-items: center; border-top: 1px solid var(--line); border-bottom: none; padding: 13px 0}
  .ap-table td, .ap-table th {padding: 0}
  .ap-table th {grid-row: 1; grid-column: 1}
  .ap-item {gap: 10px; margin-right: 10px}
  .ap-item img {height: 42px; width: 42px}
  .ap-row-status {grid-column: 2; grid-row: 1; text-align: right}
  .ap-row-category {grid-column: 1; grid-row: 2; font-size: .8rem; color: var(--muted); margin-left: 52px}
  .ap-row-price {grid-column: 2; grid-row: 2; text-align: right; font-size: .85rem}
}
@media (max-width: 570px) {
  .ap-fields {grid-template-columns: minmax(0, 1fr)}
  .ap-filters {gap: 10px}
  .ap-filters label {font-size: .81rem}
  .ap-view select {padding-left: 8px}
  .ap-table tbody th {font-size: .88rem}
}
.ap-list-panel {--ap-panel-inset: clamp(14px, 1.8vw, 28px)}
.ap-list-panel .ap-filters {margin: var(--ap-panel-inset) var(--ap-panel-inset) 0}
.ap-list-panel .ap-list-meta {margin-inline: var(--ap-panel-inset)}
.ap-list-panel .ap-table tr > :first-child {padding-left: var(--ap-panel-inset)}
.ap-list-panel .ap-table tr > :last-child {padding-right: var(--ap-panel-inset)}
@media (max-width: 740px) {
  .ap-list-panel .ap-results {margin-inline: var(--ap-panel-inset)}
  .ap-list-panel .ap-table tr > :first-child, .ap-list-panel .ap-table tr > :last-child {padding-inline: 0}
}
@media (max-width: 400px) {
  .ap-list-panel .ap-filters {grid-template-columns: minmax(0, 1fr)}
}
.ap-upload {display: flex; align-items: center; gap: 18px; padding-top: 4px}
.ap-preview {width: 96px; height: 96px; flex: none; object-fit: contain; background: #f0ece2}
.ap-upload > div {min-width: 0}
.ap-upload label, .ap-photo-label {display: block; font-size: .9rem; font-weight: 500}
.ap-upload input {display: block; width: 100%; max-width: 300px; min-width: 0; margin-block: 4px; font-size: .85rem}
.ap-upload input::file-selector-button {font: inherit; color: var(--ink); padding: 7px 10px; margin-right: 8px; background: #f0ede4; border: 1px solid var(--line); border-radius: 2px; cursor: pointer}
.ap-upload small, .ap-upload-state {display: block; font-size: .8rem; color: var(--muted)}
.ap-upload-state:not(:empty) {margin-top: 4px; color: var(--ink)}
.ap-photo-label {margin: 20px 0 10px}
.ap-form [type="submit"]:disabled {opacity: .65; cursor: wait}
@media(max-width: 480px) {.ap-upload {align-items: flex-start; flex-direction: column}}
