.portal-resources-page .portal-main-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1680px;
}

.resources-page-header,
.resources-sidebar-heading,
.resources-command-bar,
.resources-editor-actions,
.resources-upload-item,
.resources-dialog-header,
.resources-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.resources-primary-action,
.resources-upload-label {
  background: #f9a900;
  border-color: #d99100;
  color: #211f20;
  font-weight: 800;
}

.resources-explorer {
  display: grid;
  min-width: 0;
  min-height: 620px;
  grid-template-columns: 270px minmax(0, 1fr);
  border: 1px solid #d8d4ce;
  background: #fff;
}

.resources-explorer-sidebar {
  min-width: 0;
  border-right: 1px solid #d8d4ce;
  background: #f7f6f4;
  padding: 16px 12px;
}

.resources-sidebar-heading h2,
.resources-items-wrap h2,
.resources-upload-queue h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.resources-sidebar-heading button,
.resources-root-select,
.resources-root-toggle,
.resources-nav-folder,
.resources-breadcrumb-link {
  border: 0;
  background: transparent;
  color: #211f20;
  font: inherit;
  cursor: pointer;
}

.resources-sidebar-heading button {
  min-height: 44px;
  padding: 6px 8px;
  font-size: .86rem;
  font-weight: 750;
}

.resources-navigation {
  display: grid;
  gap: 5px;
}

.resources-navigation > .resources-root-select,
.resources-root-row {
  min-width: 0;
  min-height: 44px;
}

.resources-root-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
}

.resources-root-select {
  min-width: 0;
  min-height: 44px;
  border-left: 3px solid transparent;
  padding: 9px 10px;
  text-align: left;
  font-weight: 800;
  overflow-wrap: normal;
  word-break: normal;
}

.resources-root-select[aria-current="page"],
.resources-nav-folder[aria-current="page"] {
  border-left-color: #f9a900;
  background: #e9f1ef;
  color: #14535b;
}

.resources-root-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.1rem;
}

.resources-root-folders {
  display: grid;
  margin-left: 22px;
  border-left: 1px solid #c9c5bf;
  padding-left: 8px;
}

.resources-nav-folder-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: stretch;
  padding-left: calc(var(--folder-depth, 0) * 12px);
}

.resources-nav-folder-toggle,
.resources-nav-folder-spacer {
  width: 36px;
  min-height: 42px;
}

.resources-nav-folder-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.resources-nav-folder-children {
  display: grid;
}

.resources-nav-folder {
  min-height: 42px;
  border-left: 3px solid transparent;
  padding: 8px 10px;
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
}

.resources-nav-empty {
  margin: 5px 10px 10px;
  color: #69645e;
  font-size: .86rem;
}

.resources-explorer-main {
  min-width: 0;
  padding: 18px;
}

.resources-command-bar {
  align-items: flex-start;
  flex-wrap: wrap;
  border-bottom: 1px solid #dedbd6;
  padding-bottom: 14px;
}

.resources-breadcrumb {
  display: flex;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.resources-transfer-summary {
  border-left: 4px solid #f9a900;
  background: #f7f6f4;
  padding: 12px 14px;
}

.resources-transfer-summary:empty {
  display: none;
}

.resources-transfer-summary h3,
.resources-transfer-summary p {
  margin: 0 0 8px;
}

.resources-transfer-summary p:last-child {
  margin-bottom: 0;
}

.resources-destination-field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.resources-destination-field legend {
  margin-bottom: 6px;
  font-weight: 800;
}

.resources-destination-list {
  max-height: min(48dvh, 440px);
  overflow: auto;
  border: 1px solid #aaa59f;
  background: #fff;
}

.resources-destination-group + .resources-destination-group {
  border-top: 1px solid #dedbd6;
}

.resources-destination-group h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 9px 12px;
  background: #f1efec;
  font-size: .95rem;
}

.resources-destination-option {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: start;
  min-height: 44px;
  padding: 9px 12px 9px calc(12px + min(var(--destination-depth), 8) * 18px);
  border-top: 1px solid #eeeae5;
  cursor: pointer;
}

.resources-destination-option:has(input:checked) {
  background: #e8f2f0;
  box-shadow: inset 4px 0 #f9a900;
}

.resources-destination-option:has(input:disabled) {
  color: #6d6862;
  background: #faf9f7;
  cursor: not-allowed;
}

.resources-destination-option input {
  width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
}

.resources-destination-label,
.resources-destination-reason {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resources-destination-reason {
  grid-column: 2;
  font-size: .85rem;
}

.resources-breadcrumb-link {
  min-height: 44px;
  padding: 6px;
  color: #14535b;
  font-weight: 800;
  text-decoration: underline;
}

.resources-breadcrumb-link[aria-current="page"],
.resources-breadcrumb-current {
  color: #211f20;
  font-weight: 800;
  text-decoration: none;
}

.resources-editor-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.resources-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 15px 0;
}

.resources-toolbar label,
.resources-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  font-weight: 700;
}

.resources-toolbar input,
.resources-toolbar select,
.resources-form input,
.resources-form select,
.resources-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border: 1px solid #aaa59f;
  border-radius: 3px;
  background: #fff;
  color: #211f20;
  padding: 9px 11px;
  font: inherit;
}

.resources-form textarea {
  min-height: 100px;
  resize: vertical;
}

.resources-toolbar button,
.resources-editor-actions button,
.resources-upload-label,
.resources-upload-item-actions button,
.resources-dialog button {
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid #aaa59f;
  border-radius: 3px;
  padding: 9px 14px;
  box-shadow: 0 2px 5px rgb(33 31 32 / 14%);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.resources-toolbar button,
.resources-editor-actions button,
.resources-upload-item-actions button,
.resources-dialog button:not(.resources-primary-action) {
  background: #fff;
  color: #211f20;
}

.resources-editor-actions button:disabled,
.resources-upload-label[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed;
}

.resources-upload-label {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid #d99100;
  border-radius: 3px;
  padding: 9px 14px;
  box-shadow: 0 2px 5px rgb(33 31 32 / 14%);
  cursor: pointer;
}

.resources-upload-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.resources-upload-label:has(input:focus-visible) {
  outline: 3px solid #f9a900;
  outline-offset: 2px;
}

.resources-drop-zone {
  display: grid;
  min-height: 88px;
  place-content: center;
  gap: 5px;
  border: 2px dashed #6f6a64;
  background: #f7f6f4;
  padding: 16px;
  text-align: center;
}

.resources-drop-zone.is-drag-over {
  border-color: #14535b;
  background: #e9f1ef;
  box-shadow: inset 0 0 0 2px #14535b;
}

.resources-drop-zone.is-disabled {
  border-color: #c7c3bd;
  color: #69645e;
}

.resources-upload-queue {
  margin-top: 14px;
  border: 1px solid #dedbd6;
  padding: 13px;
}

#resources-upload-list {
  display: grid;
  margin-top: 8px;
}

.resources-upload-item {
  min-width: 0;
  border-top: 1px solid #dedbd6;
  padding: 9px 0;
}

.resources-upload-item-details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.resources-upload-item-details strong,
.resources-upload-item-details span {
  overflow-wrap: anywhere;
}

.resources-upload-error,
.resources-upload-incomplete,
.resources-inline-error {
  color: #a31919;
  font-weight: 750;
}

.resources-result-status {
  min-height: 24px;
  margin: 14px 0;
  color: #5e5a55;
}

.resources-items-wrap {
  margin-top: 14px;
}

.resources-items {
  display: block;
  min-width: 0;
  border-top: 1px solid #d8d4ce;
}

.resources-list-header,
.resources-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 132px 44px;
  gap: 12px;
  align-items: center;
}

.resources-list-header {
  min-height: 36px;
  padding: 0 6px;
  color: #69645e;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.resources-entry-row {
  position: relative;
  min-width: 0;
  min-height: 68px;
  border-bottom: 1px solid #dedbd6;
  background: #fff;
  padding: 9px 6px;
}

.resources-entry-row:hover,
.resources-entry-row:focus-within {
  background: #f7faf9;
}

.resources-entry-row.is-reorderable {
  cursor: grab;
}

.resources-entry-row.is-reorder-dragging {
  opacity: .48;
}

.resources-entry-row.is-reorder-target-before::before,
.resources-entry-row.is-reorder-target-after::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 3px;
  background: #14535b;
  content: "";
}

.resources-entry-row.is-reorder-target-before::before {
  top: -2px;
}

.resources-entry-row.is-reorder-target-after::after {
  bottom: -2px;
}

.resources-entry-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.resources-item-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-content: center;
  border-radius: 3px;
  background: #edf4f2;
  color: #14535b;
  font-size: 1.15rem;
  font-weight: 800;
}

.resources-image-thumbnail {
  display: grid;
  width: 72px;
  height: 54px;
  flex: 0 0 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8d4ce;
  border-radius: 3px;
  background: #f3f2ef;
  color: #14535b;
}

.resources-image-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resources-image-thumbnail-placeholder {
  font-size: 1.35rem;
  font-weight: 800;
}

.resources-image-thumbnail.is-loaded .resources-image-thumbnail-placeholder {
  display: none;
}

.resources-item-details {
  min-width: 0;
}

.resources-entry-title,
.resources-entry-description,
.resources-entry-subtitle,
.resources-entry-type,
.resources-entry-updated {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}

.resources-entry-title {
  display: inline-block;
  border: 0;
  background: transparent;
  color: #14535b;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.resources-entry-title.is-disabled {
  color: #211f20;
  cursor: default;
}

.resources-entry-description {
  margin-top: 4px;
  white-space: pre-wrap;
}

.resources-entry-subtitle,
.resources-entry-type,
.resources-entry-updated {
  margin-top: 5px;
  color: #69645e;
  font-size: .86rem;
}

.resources-row-menu {
  position: relative;
  justify-self: end;
}

.resources-row-menu summary {
  display: grid;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #211f20;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.resources-row-menu summary::-webkit-details-marker {
  display: none;
}

.resources-row-menu[open] summary,
.resources-row-menu summary:hover {
  border-color: #aaa59f;
  background: #fff;
}

.resources-row-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 32px));
  border: 1px solid #aaa59f;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(33 31 32 / 20%);
  padding: 5px;
}

.resources-row-menu-item,
.resources-row-menu-note {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: #fff;
  color: #211f20;
  padding: 10px 11px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.resources-row-menu-item {
  cursor: pointer;
}

.resources-row-menu-item:hover,
.resources-row-menu-item:focus-visible {
  background: #e9f1ef;
}

.resources-row-menu-note {
  display: block;
  color: #69645e;
}

.resources-icon-button {
  min-width: 44px;
  padding-inline: 10px !important;
}

.resources-upload-file-summary {
  margin: 0;
  overflow-wrap: anywhere;
  color: #5e5a55;
}

.resources-empty {
  border-block: 1px solid #dedbd6;
  padding: 32px 0;
  text-align: center;
}

.resources-dialog {
  box-sizing: border-box;
  width: min(680px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: 5px;
  padding: 0;
  color: #211f20;
}

.resources-dialog::backdrop {
  background: rgb(33 31 32 / 66%);
}

.resources-dialog-shell {
  display: grid;
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr);
}

.resources-dialog-header {
  border-bottom: 1px solid #dedbd6;
  padding: 16px 18px;
}

.resources-dialog-header h2 {
  min-width: 0;
  margin: 0;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
  word-break: normal;
}

.resources-dialog-body {
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.resources-form {
  display: grid;
  gap: 15px;
}

.resources-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid #dedbd6;
  padding-top: 15px;
}

.resources-form-help {
  margin: 0;
  color: #5e5a55;
  font-size: .9rem;
}

.resources-inline-error {
  min-height: 1.4em;
  margin: 0;
}

.resources-preview-dialog {
  width: min(1000px, calc(100vw - 32px));
}

.resources-preview-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  margin: 0 auto;
  object-fit: contain;
}

.resources-explorer :focus-visible,
.resources-dialog :focus-visible {
  outline: 3px solid #f9a900;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .resources-dialog,
  .resources-dialog::backdrop {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1000px) {
  .resources-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resources-toolbar label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .resources-explorer {
    grid-template-columns: minmax(0, 1fr);
  }
  .resources-explorer-sidebar {
    border-right: 0;
    border-bottom: 1px solid #d8d4ce;
  }
  .resources-navigation {
    max-height: 42dvh;
    overflow: auto;
  }
}

@media (max-width: 600px) {
  .resources-page-header,
  .resources-command-bar,
  .resources-upload-item {
    align-items: stretch;
    flex-direction: column;
  }
  .resources-explorer-main {
    padding: 13px;
  }
  .resources-editor-actions,
  .resources-upload-item-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resources-editor-actions > *,
  .resources-upload-item-actions > * {
    width: 100%;
  }
  .resources-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
  .resources-toolbar label:first-child {
    grid-column: auto;
  }
  .resources-list-header {
    display: none;
  }
  .resources-entry-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 3px 8px;
    padding-block: 10px;
  }
  .resources-entry-name {
    grid-column: 1;
    grid-row: 1;
  }
  .resources-entry-type,
  .resources-entry-updated {
    grid-column: 1;
  }
  .resources-entry-type {
    grid-row: 2;
  }
  .resources-entry-updated {
    grid-row: 3;
  }
  .resources-row-menu {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
  }
  .resources-image-thumbnail {
    width: 88px;
    height: 66px;
    flex-basis: 88px;
  }
  .resources-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .resources-dialog-shell {
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .resources-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
