
.upload-panel.is-dragging {
  border-color: #93c5fd;
  background: #eff6ff;
}

.icon-xs.is-success,
.icon-sm.is-success,
.icon-md.is-success {
  color: #16a34a;
}

.icon-flip-x {
  transform: scaleX(-1);
}

.custom-dropdown {
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 260px;
  display: none;
  z-index: 120;
}

.header-more-dropdown {
  top: calc(100% + 4px);
  margin-top: 0;
}

.dropdown.open .custom-dropdown {
  display: block;
}

.custom-dropdown .dropdown-item {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.custom-dropdown .dropdown-item:hover {
  background: #f9fafb;
}

.custom-dropdown .dropdown-item.active,
.custom-dropdown .dropdown-item.active:hover,
.custom-dropdown .dropdown-item.active:focus {
  background: #f3f4f6;
  color: #111827;
}

.comment-notifications-dropdown {
  width: min(680px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 0;
  overflow: visible;
}
.comment-notifications-header,
.comment-notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}
.comment-notifications-header {
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.comment-notifications-filter {
  width: 190px;
}
.comment-notifications-toolbar {
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.comment-notifications-view-tabs {
  display: flex;
  gap: 14px;
}
.comment-notifications-view-tabs .btn-link {
  padding: 0;
  color: var(--bs-secondary-color, #6c757d);
  text-decoration: none;
}
.comment-notifications-view-tabs .btn-link.active {
  color: var(--bs-body-color, #212529);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.comment-notifications-list {
  max-height: min(620px, calc(100vh - 180px));
  padding: 0 16px;
  overflow-y: auto;
}
.comment-notification-item {
  margin: 0;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--border);
}
.comment-notification-item:last-child {
  border-bottom: 0;
}
.comment-notification-item.is-unread {
  background: color-mix(in srgb, var(--bs-primary, #0d6efd) 5%, transparent);
}
.comment-notifications-dropdown .dam-comment-menu.is-fixed {
  z-index: 100000;
}
.comment-notification-item .dam-comment-header-row {
  align-items: center;
}
.comment-notification-type {
  flex: 0 0 auto;
}
.comment-notification-context {
  margin-top: 4px;
}
.comment-notification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 520px) {
  .comment-notifications-header,
  .comment-notifications-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .comment-notifications-filter {
    width: 100%;
  }
}

.custom-menu-item {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.custom-menu-item:hover {
  background: #f9fafb;
}

.app-toast-action {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
  border: 0;
  line-height: 1.2;
}

.app-toast-action:hover,
.app-toast-action:focus {
  color: inherit;
  opacity: 0.85;
}

.custom-menu-item.is-disabled,
.custom-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.dropdown-section-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.header-megamenu {
  width: min(1480px, calc(100vw - 64px));
  max-width: calc(100vw - 64px);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.16);
}

.header-megamenu[data-dropdown-center-menu] {
  position: fixed;
  left: 50%;
  right: auto;
  top: var(--dropdown-top, 84px);
  transform: translateX(-50%);
}

.header-megamenu-section {
  min-width: 0;
}

.header-megamenu-links {
  min-height: 360px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.header-megamenu-link-meta {
  color: #6b7280;
}

.header-megamenu-title {
  color: #111827;
}

.header-megamenu .text-secondary-emphasis,
.header-megamenu-more {
  color: #6b7280 !important;
  opacity: 0.95;
}

.header-megamenu .dropdown-item {
  color: #111827;
  white-space: normal;
}

.header-megamenu .dropdown-item:hover,
.header-megamenu .dropdown-item:focus,
.header-megamenu .dropdown-item:active {
  background: #f3f4f6;
  color: #111827;
}

.header-megamenu .dropdown-item.header-megamenu-more:hover {
  background: transparent;
  opacity: 1;
}

.header-megamenu .collection-count-badge {
  background: #f3f4f6 !important;
  color: #374151 !important;
  border-color: #e5e7eb !important;
}

@media (min-width: 1200px) {
  .header-megamenu-grid > .col + .col .header-megamenu-section {
    border-left: 1px solid #e5e7eb;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .header-megamenu {
    width: min(1080px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }

  .header-megamenu-grid > .col:nth-child(2n) .header-megamenu-section {
    border-left: 1px solid #e5e7eb;
  }

  .header-megamenu-grid > .col:nth-child(n + 3) .header-megamenu-section {
    border-top: 1px solid #e5e7eb;
  }
}

@media (max-width: 767.98px) {
  .header-megamenu {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    border-radius: 16px;
  }

  .header-megamenu-section {
    padding: 14px 16px !important;
  }

  .header-megamenu-links {
    min-height: 0;
    max-height: 220px;
  }

  .header-megamenu-grid > .col + .col .header-megamenu-section {
    border-top: 1px solid #e5e7eb;
  }
}



.filter-section-title {
  letter-spacing: 0.08em;
}

.filter-checkbox input {
  margin: 0;
}

[data-filter-clear] {
  border-radius: 999px;
  padding: 2px;
  cursor: pointer;
}

[data-filter-clear]:hover {
  background: #e5e7eb;
  color: #111827;
}

.filter-modal {
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.filter-dropdown-menu {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.filter-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  z-index: 1060;
  opacity: 0;
  transition: opacity 120ms ease;
}

.filter-drawer-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--sidebar-width, 288px), calc(100vw - 20px));
  z-index: 1065;
  padding: 0;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 120ms ease, transform 140ms ease;
}

body.filter-drawer-open .filter-drawer-backdrop {
  opacity: 1;
}

body.filter-drawer-open .filter-drawer-container {
  opacity: 1;
  transform: translateX(0);
}

.filter-drawer {
  height: 100%;
  width: 100%;
  max-width: none;
  border-radius: 0;
  background: #f9fafb;
  border-left: 1px solid #e5e7eb;
  border-right: 0;
  box-shadow: -10px 0 28px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
}

.filter-drawer .modal-body {
  flex: 1;
  max-height: none;
}

.filter-drawer .modal-footer {
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  position: sticky;
  bottom: 0;
}

.filter-modal .modal-header {
  border-bottom: 1px solid #e5e7eb;
}

.filter-drawer .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.filter-drawer .modal-header .modal-title {
  margin: 0;
  font-size: 0.95rem;
}

.filter-header-actions {
  margin-left: auto;
}

.filter-header-actions .btn-close {
  margin: 0;
  float: none;
  position: static;
}

.filter-header-actions .filter-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}

.filter-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0;
}

.filter-tag-row {
  padding: 0 20px 8px;
  margin-top: 8px;
}

/* Hide pill-style active-filter chips in the drawer UX for now. */
.filter-drawer .filter-tag-row {
  display: none !important;
}

.filter-section + .filter-section {
  border-top: 1px solid #e5e7eb;
}

.filter-section-toggle {
  width: 100%;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  text-align: left;
}

.filter-drawer .filter-section {
  border-top: 0;
  margin-bottom: 6px;
  padding:0px 6px;
}

.filter-drawer .filter-section-toggle {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #374151;
  border-radius: 10px;
  text-align: left;
}

.filter-drawer .filter-section-toggle .icon-xs {
  margin-left: auto;
  /* Set to 140ms (or any >0ms) to re-enable chevron animation quickly. */
  transition: transform var(--filter-chevron-duration, 0ms) ease;
  transform: rotate(0deg);
}

.filter-section-toggle[aria-expanded="true"] .icon-xs {
  /* Set --filter-chevron-open-rotation: 180deg; to restore up/down toggle. */
  transform: rotate(var(--filter-chevron-open-rotation, 0deg));
}

.filter-section-toggle:hover {
  background: #f9fafb;
}

.filter-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.filter-drawer .filter-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
}

/* Keep filter rows flush with section labels (no extra horizontal inset). */
.filter-drawer .tree-item {
  padding: 8px 0;
}

.filter-section-body {
  padding: 8px 20px 16px;
}

.filter-drawer .filter-section-body {
  padding: 4px 10px 8px 20px;
}

.filter-facet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-facet-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-facet-heading {
  padding-left: 0;
  opacity: 0.85;
}

.filter-facet-heading-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding-right: 10px;
  text-align: left;
}

.filter-facet-heading-toggle .chevron {
  margin-left: auto;
  /* Set to 140ms (or any >0ms) to re-enable chevron animation quickly. */
  transition: transform var(--filter-chevron-duration, 0ms) ease;
  transform: rotate(0deg) !important;
}

.filter-facet-heading-toggle.is-open .chevron {
  /* Set --filter-chevron-open-rotation: 180deg; to restore up/down toggle. */
  transform: rotate(var(--filter-chevron-open-rotation, 0deg)) !important;
}

.filter-facet-heading-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

.filter-facet-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right:-16px;
}

.filter-facet-options.is-collapsed {
  display: none;
}

.filter-facet-item {
  padding: 8px 10px;
  margin: 0 -10px;
  gap: 10px;
}

.filter-facet-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-facet-extra {
  display: inline-flex;
  align-items: center;
  color: #ca8a04;
}

.filter-facet-item .count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.filter-option-row {
  font-size: 0.85rem;
  color: #374151;
  font-weight: 500;
  padding: 8px 10px !important;
  margin: 0 -10px;
  border-radius: 10px;
}

.filter-option-row:hover {
  background: #f9fafb;
}

.filter-option-row.is-active {
  background: rgba(37, 99, 235, 0.12);
}

.filter-checkbox-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-checkbox-icon {
  width: 16px;
  height: 16px;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  transition: all 0.12s ease;
}

.filter-checkbox-row input[type="checkbox"]:checked + .filter-checkbox-icon {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.filter-facet-item .filter-checkbox-icon {
  flex: 0 0 auto;
}

.filter-facet-item.is-active .filter-checkbox-icon {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.filter-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-grid-row {
  display: grid;
  grid-template-columns: minmax(140px, 33%) 1fr;
  gap: 16px;
  align-items: center;
}

.filter-grid-label {
  font-size: 0.9rem;
  color: #374151;
}

.filter-grid-input .form-select,
.filter-grid-input .form-control {
  width: 100%;
}

[data-filter-button].btn-outline-dark:hover,
[data-filter-button].btn-outline-dark:focus,
[data-filter-button].btn-outline-dark:active {
  background-color: transparent;
}

[data-filter-button].icon-button {
  border: 1px solid transparent;
  padding: 0;
  width: 36px;
  height: 36px;
  position: relative;
}

[data-filter-button].icon-button.is-active {
  border-color: #d1d5db;
}

[data-filter-button].icon-button.filter-pill {
  border-radius: 10px;
}

[data-filter-button].icon-button .filter-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.filter-header-actions .filter-count-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-top: 0;
  position: relative;
  top: -1px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.header-search .filter-pill {
  padding: 2px 8px;
  border-radius: 999px;
}

.btn-tertiary {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.btn-tertiary:hover,
.btn-tertiary:focus,
.btn-tertiary:active {
  border-color: #cbd5e1;
  background: #f9fafb;
  color: #1f2937;
}

.header-search .filter-pill .icon-sm {
  margin-right: 2px;
}
[data-filter-button].btn-outline-primary:hover,
[data-filter-button].btn-outline-primary:focus,
[data-filter-button].btn-outline-primary:active {
  background-color: transparent;
}

[data-filter-clear] {
  border-radius: 999px;
  padding: 2px;
  cursor: pointer;
}

[data-filter-clear]:hover {
  background: #e5e7eb;
  color: #111827;
}

.header-search .filter-pill {
  padding: 2px 8px;
  border-radius: 999px;
}

.header-search .filter-pill .icon-sm {
  margin-right: 2px;
}



.action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(220%);
  opacity: 0;
  pointer-events: none;
  background: #000;
  color: var(--light-grey-1);
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  z-index: 180;
}

.action-bar-summary,
.action-bar-summary span,
.action-bar-controls > .icon-button,
.action-bar-controls > .download-dropdown > .icon-button,
.action-bar-controls > button.icon-button {
  color: #fff !important;
}

.action-bar-controls > .icon-button i,
.action-bar-controls > .icon-button svg,
.action-bar-controls > .download-dropdown > .icon-button i,
.action-bar-controls > .download-dropdown > .icon-button svg,
.action-bar-controls > button.icon-button i,
.action-bar-controls > button.icon-button svg,
.action-bar-summary i,
.action-bar-summary svg {
  color: #fff !important;
  stroke: currentColor;
}

.action-bar.is-active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.action-bar .icon-button {
  background: transparent;
  color: var(--light-grey-1);
}

.action-bar .icon-button:hover {
  background: var(--dark-grey-3);
}

.action-bar .icon-button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.action-bar .divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}


.image-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
  overflow: hidden;
  overscroll-behavior: contain;
}

.image-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   DARK MODE OVERRIDES
   (keep custom styles above)
   ========================= */
html[data-theme="dark"] .image-modal-overlay {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .modal-backdrop {
  background-color: rgba(255, 255, 255, 0.08);
}

body.modal-open {
  overflow: hidden;
}

.image-modal-shell {
  width: min(1400px, 96vw);
  height: min(92vh, 920px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.image-modal-overlay.is-variations-mode [data-modal-main-actions] {
  display: none !important;
}

.image-modal-overlay.is-variations-mode [data-modal-variation-add] {
  display: inline-flex !important;
}

.image-modal-overlay.is-variations-mode [data-crop-request-dropdown] {
  display: inline-flex !important;
}

.image-modal-overlay.is-versions-mode [data-modal-main-actions],
.image-modal-overlay.is-versions-mode [data-modal-variation-add],
.image-modal-overlay.is-versions-mode [data-crop-request-dropdown] {
  display: none !important;
}

.image-modal-overlay.is-versions-mode [data-modal-version-upload] {
  display: inline-flex !important;
}

.image-modal-overlay.is-versions-mode [data-modal-version-compare-toggle] {
  display: inline-flex !important;
}

.image-modal-overlay.is-versions-compare-mode [data-modal-version-upload],
.image-modal-overlay.is-versions-compare-mode [data-modal-version-compare-toggle] {
  display: none !important;
}

.image-modal-overlay.is-comments-mode .modal-header-actions {
  display: none !important;
}

/* Public review links use the normal comments view without exposing the DAM sidebar. */
.image-modal-overlay.is-public-review-page .modal-sidebar {
  display: none !important;
}

.image-modal-overlay.is-public-review-page .modal-comments-preview {
  flex-basis: 62%;
}

.image-modal-overlay.is-public-review-page .modal-comments-panel {
  flex-basis: min(520px, 42%);
}

[data-modal-version-compare-toggle] svg {
  transform: rotate(90deg);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.privacy-pill.is-public {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #6b7280;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}

.privacy-pill i {
  color: inherit;
}

.btn.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 4px !important;
  min-height: 0;
}

.variation-title-row .variation-title {
  margin: 0;
}

.modal-title-prefix {
  font-weight: 500;
  color: #6b7280;
}

.modal-title-name {
  font-weight: 600;
}

.variation-title-row .privacy-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.privacy-icon.is-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

.variation-crop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #374151;
}

.variation-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0e7490;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(8, 145, 178, 0.3);
}

.variation-status-badge.is-icon-only {
  padding-inline: 7px;
}

.variation-status-dropdown {
  position: relative;
  display: inline-flex;
}

.variation-status-dropdown .variation-status-badge {
  border: none;
  cursor: pointer;
}

.variation-status-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 8px;
  display: none;
  z-index: 60;
}

.variation-status-dropdown.is-open .variation-status-menu {
  display: block;
}

.variation-status-menu button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
  color: #374151;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.variation-status-menu button:hover {
  background: #f9fafb;
}

.variation-status-badge.changes {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(217, 119, 6, 0.3);
}

.variation-status-badge.rejected {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(220, 38, 38, 0.3);
}

.variation-status-badge.approved {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(5, 150, 105, 0.3);
}

.variation-thumb-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.variation-primary-badge {
  position: absolute;
  top: -12px;
  left: -12px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  border-radius: 8px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.variation-panel-badge {
  position: absolute;
  top: -12px;
  left: -12px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 3;
}

.variation-mismatch-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.variation-size-conflict-badge {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.crop-request-check {
  opacity: 0;
}

.crop-request-check.is-visible,
.download-menu-item.is-existing .crop-request-check {
  opacity: 1;
}

.download-dropdown .download-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 1200;
}

.download-dropdown .download-menu .download-menu-item span {
  white-space: nowrap;
}

.download-dropdown.is-open .download-menu {
  display: block;
}

.download-dropdown--card .download-menu {
  right: 0;
  left: auto;
  min-width: 200px;
}

.download-dropdown--left .download-menu {
  left: 0;
  right: auto;
}

.download-dropdown--action .download-menu {
  right: 0;
  left: auto;
  min-width: 240px;
  bottom: calc(100% + 6px);
  top: auto;
  visibility: hidden;
}

.download-dropdown--action.is-open .download-menu {
  visibility: visible;
}

.download-menu-item {
  color: #111827;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.download-menu-item:hover {
  background: #f9fafb !important;
}

.download-menu-item:focus,
.download-menu-item:focus-visible {
  background: #f9fafb !important;
}

.download-menu-item.dropdown-item:hover,
.download-menu-item.dropdown-item:active {
  background: #f9fafb !important;
  color: inherit;
}

.download-menu-item.dropdown-item:not(.text-danger) {
  color: #374151;
}

.download-menu-item.dropdown-item:not(.text-danger):hover,
.download-menu-item.dropdown-item:not(.text-danger):active {
  color: #374151;
}

.download-menu-item.is-danger {
  color: #dc2626;
}

.download-menu-item.is-danger:hover {
  background: #fef2f2 !important;
}

.download-menu-item.review-action.is-rejected {
  color: #ef4444;
}

.download-menu-item.is-disabled {
  opacity: 1;
  color: #9ca3af;
  pointer-events: auto;
  filter: grayscale(0.2);
}

.download-menu-item.is-disabled:hover,
.download-menu-item.is-disabled:focus,
.download-menu-item.is-disabled:focus-visible {
  background: transparent !important;
}

.download-menu-item.is-disabled span,
.download-menu-item.is-disabled .download-status {
  opacity: 0.7;
}

.download-menu-label {
  font-size: 0.7rem;
}

.download-status {
  font-size: 0.78rem;
}

.download-status .status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.download-status[data-tooltip] {
  position: relative;
  cursor: default;
}

.download-status[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: normal;
  min-width: 220px;
  max-width: 280px;
  line-height: 1.3;
  text-align: left;
  word-break: normal;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateX(-50%) translateY(4px);
  z-index: 10;
}

.download-status[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #111827;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9;
}

.download-menu:not(:hover) .download-status[data-tooltip]::after,
.download-menu:not(:hover) .download-status[data-tooltip]::before {
  opacity: 0;
}

.download-status[data-tooltip]:hover::after,
.download-status[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.download-menu:not(.is-ready) .download-status[data-tooltip]::after,
.download-menu:not(.is-ready) .download-status[data-tooltip]::before {
  opacity: 0 !important;
}

.download-menu-item[data-tooltip] {
  position: relative;
}

.download-menu-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: normal;
  min-width: 220px;
  max-width: 280px;
  line-height: 1.3;
  text-align: left;
  word-break: normal;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateX(-50%) translateY(4px);
  z-index: 10;
}

.download-menu-item[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #111827;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9;
}

.download-menu-item[data-tooltip]:hover::after,
.download-menu-item[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.download-menu-item.is-disabled .download-status {
  pointer-events: auto;
}

.download-status.is-ok {
  color: #16a34a;
}

.download-status.is-warn {
  color: #f59e0b;
}

.download-status.is-bad {
  color: #dc2626;
}

.download-menu-item span {
  white-space: nowrap;
}

.image-modal-alert.is-visible {
  display: block;
}

.modal-view {
  display: none;
  flex: 1;
}

.modal-view.is-active {
  display: flex;
}

.modal-view-main {
  flex: 1;
  min-width: 0;
}

.modal-view-main.is-active {
  display: flex;
}

.image-modal-body {
  min-height: 0;
}

.modal-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.modal-image-wrap img {
  max-width: 100%;
  max-height: calc(92vh - 220px);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.modal-image-wrap.is-loading img {
  opacity: 0;
}

.modal-image-loader {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
}

.modal-image-wrap.is-loading .modal-image-loader {
  opacity: 1;
}

.modal-image-area {
  background: #faf9f8;
  min-width: 0;
  flex: 1 1 auto;
}

.modal-view-crop {
  flex: 1;
  background: #ffffff;
}

.modal-crop-body {
  min-height: 0;
}

.modal-crop-canvas {
  background: #f8fafc;
  padding: 24px;
}

.modal-crop-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  max-height: 70vh;
  /* background: #f3f4f6; */
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-crop-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.modal-crop-image-wrap .cropper-container,
.modal-crop-image-wrap .cropper-wrap-box,
.modal-crop-image-wrap .cropper-canvas {
  border-radius: 0;
}

.modal-crop-sidebar {
  width: 380px;
  min-width: 320px;
  max-width: 420px;
  background: #ffffff;
  overflow-y: auto;
  flex: 0 0 380px;
}

.modal-crop-actions {
  align-items: center;
}

.modal-crop-actions .btn {
  width: fit-content;
}

.crop-output-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crop-output-row #crop-editor-output-display {
  margin: 0;
  width: auto;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

.crop-output-warning {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.crop-dimensions-card {
  background: #ffffff;
}

.modal-crop-sidebar input[type="number"] {
  -moz-appearance: textfield;
}

.modal-crop-sidebar input[type="number"]::-webkit-outer-spin-button,
.modal-crop-sidebar input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.image-modal-overlay.is-crop-mode [data-modal-main-actions],
.image-modal-overlay.is-crop-mode [data-modal-variation-add],
.image-modal-overlay.is-crop-mode [data-crop-request-dropdown] {
  display: none !important;
}

.image-modal-overlay.is-crop-mode [data-crop-hide] {
  display: none !important;
}

.modal-crop-title-muted {
  color: var(--muted);
  /* font-weight: 500; */
}

.image-modal-shell.is-slide-left {
  animation: modal-slide-left 160ms ease-out;
}

.image-modal-shell.is-slide-right {
  animation: modal-slide-right 160ms ease-out;
}

@keyframes modal-slide-left {
  from {
    transform: translateX(8px);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes modal-slide-right {
  from {
    transform: translateX(-8px);
  }
  to {
    transform: translateX(0);
  }
}

.image-nav-row {
  z-index: 2;
}

.image-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.image-nav-btn {
  height: 28px;
  padding: 0 10px;
  min-width: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.image-nav-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.modal-sidebar {
  width: 360px;
  min-width: 360px;
  flex: 0 0 360px;
  overscroll-behavior: contain;
}

@media (max-width: 991.98px) {
  .image-modal-overlay {
    align-items: stretch;
    overflow-y: auto;
  }

  .image-modal-shell {
    margin: 0 auto;
    height: auto;
    min-height: 100vh;
    max-height: none;
  }

  .image-modal-body {
    overflow: visible;
  }

  .modal-view-main {
    flex-direction: column;
    min-height: 0;
    height: auto;
  }

  .modal-image-area {
    width: 100%;
    flex: 0 0 auto;
  }

  .modal-sidebar {
    width: 100%;
    min-width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
  }
}

.modal-sidebar.is-editing .field-value {
  display: none;
}

.modal-sidebar.is-editing [data-modal-file-name] {
  display: block;
}

.modal-sidebar.is-editing .field-input {
  display: block;
}

.modal-sidebar.is-editing .workspace-field-input {
  display: grid;
}

.field-actions {
  display: none;
  justify-content: flex-start;
}

.modal-sidebar.is-editing .field-actions {
  display: flex;
}

.variation-preview {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  margin-bottom: 20px;
}

.variation-header .link {
  color: #4b5563;
  font-weight: 600;
}

.variation-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.variation-thumbs img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.sidebar-section .section-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 12px;
}

.results-layout {
  display: flex;
  min-height: calc(100vh - 76px);
}

.results-content {
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - 76px);
}

.results-inner {
  padding: 24px;
  position: relative;
  z-index: 2;
}

.sidebar {
  width: var(--sidebar-width, 288px);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 180ms ease, opacity 180ms ease, transform 180ms ease;
  height: calc(100vh - 76px);
  position: relative;
}

body[data-navigation-mode="megamenu"] .sidebar {
  display: none;
}

body[data-navigation-mode="megamenu"][data-page="settings"] .sidebar {
  display: flex;
}

body[data-navigation-mode="megamenu"] .results-content {
  flex: 1 1 auto;
}

.sidebar.is-collapsed {
  width: 0;
  opacity: 0;
  transform: translateX(-8px);
  border-right: none;
  overflow: hidden;
  flex: 0 0 0;
  margin-right: 0;
  padding: 0;
}

.sidebar.is-collapsed + .results-content {
  flex: 1;
}

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

.sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: transparent;
  transition: background 120ms ease;
}

.sidebar-resize-handle:hover::after,
.sidebar-resize-handle.is-dragging::after {
  background: #3b82f6;
}

body.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

.sidebar-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}


.section-toggle,
.sub-toggle,
.tree-item {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #374151;
  border-radius: 10px;
  text-align: left;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.tree-item.collection-leaf::before {
  content: none;
}

.sub-toggle {
  padding-left: 34px;
}

/* Child rows align text with parent labels; nesting is shown by connector line. */
.section-panel > .tree-item {
  padding-left: 34px !important;
}

/* Use connector lines for nested sidebar items instead of a rotating chevron. */
.sub-toggle .chevron {
  display: none;
}

.sub-toggle + .section-panel,
.sidebar-collection-row:has(.sub-toggle) + .section-panel {
  position: relative;
  margin-left: 30px;
}

.sub-toggle + .section-panel.is-open::before,
.sidebar-collection-row:has(.sub-toggle) + .section-panel.is-open::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 8px;
  left: 10px;
  width: 1px;
  background: #d1d5db;
  display: block !important;
  z-index: 3;
  pointer-events: none;
}

.section-toggle[data-sidebar-id="favorites"] + .section-panel.is-open::before,
.section-toggle[data-sidebar-id="quick-links"] + .section-panel.is-open::before,
.section-toggle[data-sidebar-id="collections"] + .section-panel.is-open::before,
.sidebar-collection-row:has([data-sidebar-id="collections"]) + .section-panel.is-open::before,
.sidebar-collection-row:has([data-sidebar-id="quick-links"]) + .section-panel.is-open::before,
.section-toggle[data-sidebar-id="settings-my"] + .section-panel.is-open::before,
.section-toggle[data-sidebar-id="settings-org"] + .section-panel.is-open::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 18px;
  width: 1px;
  background: #d1d5db;
  display: block !important;
  z-index: 3;
  pointer-events: none;
}

.section-toggle:hover,
.sub-toggle:hover,
.tree-item:hover {
  background: #f9fafb;
}

.section-toggle .count,
.tree-item .count,
.sub-toggle .count {
  margin-left: auto;
  font-size: 0.75rem;
  color: #6b7280;
}

.quick-link-leaf-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.quick-link-leaf-name {
  line-height: 1.15;
}

.quick-link-leaf-meta {
  font-size: 0.72rem;
  line-height: 1.15;
  color: #9ca3af;
  font-weight: 400;
}

.section-panel {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: max-height 220ms ease, opacity 180ms ease, clip-path 220ms ease;
}

.section-panel.is-open {
  max-height: 1000px;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  position: relative;
}

.section-panel.is-open::before {
  display: none;
}

.section-panel .section-panel.is-open::before {
  display: none;
}

.section-toggle .chevron,
.sub-toggle .chevron,
.tree-item .chevron {
  transition: transform 0.2s ease;
}

.section-toggle.is-open .chevron,
.sub-toggle.is-open .chevron,
.tree-item.is-open .chevron {
  transform: rotate(90deg);
}


.tree-item.is-active {
  color: #111827;
  background: #f3f4f6;
  font-weight: 600;
}

.folder-open {
  display: none;
}

.tree-item.is-open .folder-open {
  display: inline-block;
}

.tree-item.is-open .folder-closed {
  display: none;
}

.tree-root {
  margin-top: 10px;
}

.tree-child {
  margin-left: 10px;
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 160ms ease, opacity 120ms ease;
}

.tree-child.is-open {
  max-height: 1000px;
  opacity: 1;
}

.tree-item .spacer {
  display: inline-block;
  width: 16px;
}

@media (max-width: 992px) {
  .sidebar {
    display: none;
  }
}

.modal-sidebar.is-editing .field-edit-link {
  display: none;
}



.modal-versions {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.modal-versions-preview {
  flex: 1 1 auto;
  background: #faf9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.modal-versions-preview .version-preview-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-versions-preview img {
  max-width: 100%;
  max-height: calc(95vh - 200px);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.modal-versions-panel {
  flex: 0 0 38%;
  min-width: 360px;
  max-width: 520px;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e5e7eb;
}

.modal-versions-header .icon-split-off {
  display: none;
}

.modal-versions.is-collapsed .modal-versions-preview {
  display: none;
}

.modal-versions.is-collapsed .modal-versions-panel {
  border-left: none;
}

.modal-versions.is-collapsed .icon-split-on {
  display: none;
}

.modal-versions.is-collapsed .icon-split-off {
  display: inline-block;
}

.modal-versions-list {
  flex: 1;
  padding: 16px;
  display: grid;
  gap: 16px;
  overflow-y: auto;
}

.modal-versions-compare {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  background: #fff;
  overflow: hidden;
}

.version-compare-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.version-compare-header {
  margin-bottom: 10px;
}

.version-compare-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-compare-controls .form-select {
  flex: 1 1 auto;
  min-width: 0;
}

.version-compare-controls .btn {
  height: calc(1.5em + 0.5rem + 2px);
  min-width: calc(1.5em + 0.5rem + 2px);
  padding: 0;
  justify-content: center;
}

.version-compare-image-wrap {
  flex: 1;
  min-height: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #faf9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
}

.version-compare-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.version-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.version-row.is-current {
  background: #f9fafb;
}

.modal-versions.is-split .version-row {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-versions.is-split .version-row:hover {
  background: #f9fafb;
}

.modal-versions.is-split .version-row.is-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.version-thumb {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 0;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.version-info {
  flex: 1;
}

.version-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.version-title.is-current {
  font-weight: 700;
}

.version-meta {
  margin: 0 0 3px;
  font-size: 0.8rem;
  color: #6b7280;
}

.version-meta span {
  color: #111827;
  font-weight: 600;
}

.version-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: auto;
  min-width: 128px;
}

.version-row-deleted {
  padding: 12px 14px;
  margin: 6px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

@media (max-width: 1200px) {
  .modal-versions-panel {
    flex-basis: 42%;
    min-width: 320px;
    max-width: 460px;
  }
}

@media (max-width: 992px) {
  .modal-versions-compare {
    grid-template-columns: 1fr;
  }
}

.modal-variations {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.modal-variations-preview {
  flex: 1;
  background: #faf9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.modal-variations-preview .variation-preview-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-variations-preview img {
  max-width: 100%;
  max-height: calc(95vh - 200px);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.modal-variations-panel {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e5e7eb;
  overflow-y: auto;
}

.modal-variations-header {
  display: none;
  border-bottom: none;
}

.modal-variations-header .icon-split-off {
  display: none;
}

.modal-variations.is-collapsed .modal-variations-preview {
  display: none;
}

.modal-variations.is-collapsed .modal-variations-panel {
  border-left: none;
}

.modal-variations.is-collapsed .icon-split-on {
  display: none;
}

.modal-variations.is-collapsed .icon-split-off {
  display: inline-block;
}

.modal-variations-list {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 16px;
  display: grid;
  gap: 16px;
  overflow: visible;
  background: #faf9f8;
}

.variation-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  position: relative;
}

.variation-row.is-crop {
  margin-left: 32px;
  padding: 16px 20px;
  gap: 16px;
}

.variation-crop-group {
  display: grid;
  gap: 12px;
  margin-top: -6px;
}

.variation-crop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.variation-crop-toggle:hover,
.variation-crop-toggle:focus {
  color: #111827;
}

.variation-crop-toggle .icon-xs {
  transition: transform 0.18s ease;
}

.variation-crop-toggle.is-open .icon-xs {
  transform: rotate(90deg);
}

.variation-crop-group-body {
  display: grid;
  gap: 16px;
}

.variation-row.is-crop .variation-thumb {
  width: 88px;
  height: 88px;
}

.variation-row.is-crop .crop-lead {
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  pointer-events: none;
}

.variation-row.is-primary {
  background: #f9fafb;
}

.modal-variations.is-split .variation-row {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-variations.is-split .variation-row:hover {
  background: #f9fafb;
}

.modal-variations.is-split .variation-row.is-selected {
  position: relative;
  z-index: 3;
}

.modal-variations.is-split .variation-row.is-selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.55);
  pointer-events: none;
}

.variation-thumb {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.variation-info {
  flex: 1;
}

.variation-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
}

.variation-title.is-primary {
  font-weight: 700;
}

.variation-meta {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.variation-meta-secondary {
  margin-top: 8px;
  font-size: 0.78rem;
}

.variation-meta span {
  color: #111827;
  font-weight: 600;
}

.variation-note {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.variation-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variation-actions .btn {
  min-height: 0;
}

.variation-actions .download-dropdown {
  width: 100%;
}

.variation-actions .download-dropdown.is-dropup .download-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.variation-actions .download-dropdown .btn {
  width: 100%;
  /* padding: 4px 8px; */
  /* font-size: 0.72rem; */
}

.variation-more {
  position: relative;
}

.variation-more-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 8px;
  display: none;
  z-index: 40;
}

.variation-more.is-dropup .variation-more-menu {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 6px;
}

.variation-more.is-open .variation-more-menu {
  display: block;
}

.variation-more-menu button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
  color: #374151;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.variation-more-menu button:hover {
  background: #f9fafb;
}

.variation-more-menu button:active {
  background: transparent;
}

.variation-more-menu .danger {
  color: #dc2626;
}

.modal-variations .btn.btn-outline-secondary:focus,
.modal-variations .btn.btn-outline-secondary:active {
  background: #fff;
  border-color: #e5e7eb;
  color: #374151;
  box-shadow: none;
}

.variation-row .btn.btn-outline-secondary {
  background: #fff;
}

.variation-row .btn.btn-outline-secondary:hover,
.variation-row .btn.btn-outline-secondary:focus {
  background: #fff;
  border-color: #94a3b8;
  color: #111827;
}

.variation-row .btn.btn-outline-secondary.is-disabled,
.variation-row .btn.btn-outline-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-variations.is-split .variation-row:hover .btn.btn-outline-secondary,
.modal-variations.is-split .variation-row.is-selected .btn.btn-outline-secondary {
  background: #fff;
  border-color: #e5e7eb;
  color: #374151;
}

.modal-variations.is-split .variation-row:hover .btn.btn-outline-secondary:hover,
.modal-variations.is-split .variation-row.is-selected .btn.btn-outline-secondary:hover {
  background: #fff;
  border-color: #94a3b8;
  color: #111827;
}

.variation-more-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--border);
}

.results-toolbar-actions .icon-button.is-active {
  background: #e5e7eb;
}

.results-toolbar-actions {
  position: relative;
  z-index: 50;
}

.results-toolbar-actions .dropdown-menu {
  z-index: 300;
}

.gallery-view {
  position: relative;
  z-index: 1;
}

.icon-rotate-90 {
  transform: rotate(90deg);
}

.icon-button.is-disabled,
.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-toggle {
  margin-left: -6px;
}

.grid-cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-view--masonry {
  display: block;
}

.gallery-view--masonry .image-card {
  aspect-ratio: auto;
}

.gallery-view--masonry .image-card img {
  height: auto;
}

.gallery-view--masonry.gallery-6 .gallery-col {
  flex: 0 0 16.6667%;
  max-width: 16.6667%;
}

@media (max-width: 1200px) {
  .gallery-view--masonry.gallery-6 .gallery-col {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (max-width: 992px) {
  .gallery-view--masonry.gallery-6 .gallery-col {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

@media (max-width: 768px) {
  .gallery-view--masonry.gallery-6 .gallery-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.gallery-view--justified {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.gallery-view--justified .gallery-col {
  position: relative;
  flex: 0 0 auto;
  width: 240px;
  height: 180px;
}

.gallery-view--justified .image-card {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.gallery-view--justified .image-card img {
  width: 100%;
  height: 100%;
}

.gallery-view--justified .image-card.justified-contain-narrow {
  background: #f3f4f6;
}

.gallery-view--justified .image-card.justified-contain-narrow img {
  object-fit: contain;
}

html[data-theme="dark"] .gallery-view--justified .image-card.justified-contain-narrow {
  background: var(--dark-grey-1);
}

.gallery-view--justified .image-card.justified-compact-controls .badge {
  gap: 3px;
  padding: 4px 5px;
  font-size: 0.6rem;
}

.gallery-view--justified .image-card.justified-compact-controls .badge.status + .badge.status.updated {
  top: 30px;
}

.gallery-view--justified .image-card.justified-compact-controls.has-variations .badge.favorites {
  right: 42px;
}

.gallery-view--justified .image-card.justified-compact-controls.has-many-variations .badge.favorites {
  right: 48px;
}

.gallery-view--justified .image-card.justified-compact-controls .check-toggle {
  bottom: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.gallery-view--justified .image-card.justified-compact-controls .file-type {
  font-size: 0.6rem;
  padding: 3px 5px;
}

.gallery-view--justified .image-card.justified-compact-controls .overlay-info {
  padding: 8px;
}

.gallery-view--justified .image-card.justified-compact-controls .overlay-info p {
  margin-bottom: 8px;
  font-size: 0.75rem;
}

.gallery-view--justified .image-card.justified-compact-controls .overlay-actions {
  gap: 6px;
}

.gallery-view--justified .image-card.justified-compact-controls .overlay-actions .icon-button {
  width: 28px;
  height: 28px;
}

.gallery-view--justified .image-card.justified-compact-controls .overlay-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.image-card {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.image-card.is-download-open {
  overflow: visible !important;
  z-index: 20;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card img.fit-mode {
  object-fit: contain;
  background: #f9fafb;
}

.image-card .badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 0.65rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  z-index: 3;
}

.image-card .badge.variations {
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.image-card .badge.favorites {
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  pointer-events: none;
  border: none;
}

.favorite-badge {
  cursor: pointer;
}

.favorite-badge.is-favorited svg {
  stroke: #facc15;
  fill: #facc15;
}

.favorite-badge.is-pulsing svg {
  animation: favorite-pulse 220ms ease-out;
  transform-origin: center;
}

.image-card:hover .badge.favorites {
  opacity: 1;
  pointer-events: auto;
}

.collection-favorite-badge {
  position: static;
  opacity: 1;
  pointer-events: auto;
  border: none;
  background: transparent;
  padding: 0;
  color: #94a3b8;
}

.collection-favorite-badge:hover,
.collection-favorite-badge:focus {
  background: transparent;
  color: #64748b;
}

@keyframes favorite-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}


.image-card .badge.favorites + .badge.variations {
  top: 8px;
  right: 8px;
}

.image-card.has-variations .badge.favorites {
  right: 48px;
}

.image-card.has-many-variations .badge.favorites {
  right: 56px;
}

.image-card .badge.status {
  top: 8px;
  left: 8px;
  background: #06b6d4;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

/*
.image-card .badge.status.published {
  background: #1e40af;
}
*/

.image-card .badge.status.changes {
  background: #f59e0b;
}

.image-card .badge.status.rejected {
  background: #ef4444;
}

.image-card .badge.status.archived {
  background: #4b5563;
}

.image-card .badge.status.updated {
  background: #fbbf24;
  color: #111827;
}

.image-card .badge.status + .badge.status.updated {
  top: 32px;
}

.image-card .check-toggle {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-card:hover .check-toggle {
  opacity: 1;
}

.gallery-view .gallery-col:hover .check-toggle {
  opacity: 1;
}

.selection-mode .image-card .check-toggle {
  opacity: 1;
}

.image-card .check-toggle i,
.image-card .check-toggle svg {
  opacity: 0.35;
  color: #111827;
}

.image-card.is-checked {
  outline: none;
}

.image-card.is-checked .check-toggle {
  background: #3b82f6;
}

.image-card.is-checked .check-toggle i,
.image-card.is-checked .check-toggle svg {
  opacity: 1;
  color: #fff;
}

.image-card.is-checked .check-toggle svg {
  stroke-width: 3;
}

.image-card.is-checked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 5px #3b82f6;
  pointer-events: none;
  z-index: 1;
}

.image-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.35), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  z-index: 1;
  pointer-events: auto;
}

.image-card:hover .overlay {
  opacity: 1;
}

.image-card.is-download-open .overlay {
  opacity: 1;
  z-index: 6;
}

.gallery-view .gallery-col:hover .overlay {
  opacity: 1;
}

.image-card .file-type {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 6px;
  z-index: 2;
}

.image-card .overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
}

.image-card .overlay-info p {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.image-card .overlay-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.image-card .overlay-actions .icon-button {
  background: rgba(255, 255, 255, 0.9);
  width: 32px;
  height: 32px;
  transform: translateZ(0);
  backface-visibility: hidden;
  border: none;
  line-height: 0;
}

.image-card .overlay-actions .icon-button svg {
  display: block;
  shape-rendering: geometricPrecision;
  width: 16px;
  height: 16px;
  transform: translate3d(0, 0, 0);
}

.app-logo {
  height: 32px;
}

.modal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 0.65rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.modal-status-pill.pending {
  background: #06b6d4;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.modal-status-pill.changes {
  background: #f59e0b;
}

.modal-status-pill.rejected {
  background: #ef4444;
}

.modal-status-pill.archived {
  background: #4b5563;
}

.modal-status-pill.published {
  background: #1e40af;
}

.modal-status-pill.approved {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.modal-status-pill.updated {
  background: #fbbf24;
  color: #111827;
}

.modal-review-dropdown.is-static [data-modal-status-badge] {
  cursor: default;
}

.modal-version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  color: #6b7280;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
}

.privacy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

.privacy-icon.is-public {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.list-view {
  display: none;
}
.list-view.is-active {
  display: block;
}

.table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.all-collections-table .table tbody td,
.all-collections-table .table tbody td a,
.all-collections-table .table tbody td button {
  font-size: 0.85rem;
}

.all-collections-type-icon {
  display: none;
}

.all-collections-table.show-collection-type-icons .all-collections-type-icon {
  display: inline-flex;
}

.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #ede9fe;
  color: #6d28d9;
}

.tab-button {
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  color: #6b7280;
}

.tab-button:hover {
  background: transparent;
  color: #111827;
}

.tab-button.is-active {
  border-bottom-color: #111827;
  color: #111827;
}

.all-collections-table .table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: #f9fafb;
}

.all-collections-table .table tbody tr:hover {
  background: #f3f4f6;
}

.collection-link:hover {
  text-decoration: underline;
  color: #2563eb;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 0.8rem;
}

.link-pill span {
  line-height: 1.2;
}

.link-pill-text:hover {
  text-decoration: underline;
  color: #2563eb;
}

.link-pill .icon-button {
  background: transparent;
}

html[data-theme="dark"] .link-pill {
  background: var(--dark-grey-3);
  color: var(--light-grey-2);
}

html[data-theme="dark"] .link-pill-text:hover {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .all-collections {
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .all-collections-table .table {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
  --bs-table-bg: var(--dark-grey-2);
  --bs-table-color: var(--light-grey-1);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: var(--dark-grey-3);
}

html[data-theme="dark"] .all-collections-table .table thead th {
  color: var(--light-grey-3);
  background: var(--dark-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .all-collections-table .table tbody td,
html[data-theme="dark"] .all-collections-table .table tbody td a,
html[data-theme="dark"] .all-collections-table .table tbody td button {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .all-collections-table .table tbody tr:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .tab-button {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .tab-button:hover {
  background: transparent;
  color: var(--light-grey-1);
}

html[data-theme="dark"] .tab-button.is-active {
  border-bottom-color: var(--light-grey-1);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .collection-count-badge {
  background: var(--dark-grey-3) !important;
  color: var(--light-grey-2) !important;
  border-color: var(--border) !important;
}

@media (max-width: 1200px) {
  .grid-cols-6 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .grid-cols-6,
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.add-collection-modal .modal-body {
  padding: 0;
}

.create-record-body .modal-view-main {
  flex: 1;
}

.create-record-sidebar {
  width: 380px;
}

.create-record-preview {
  max-height: 100%;
  object-fit: contain;
}

.create-record-sidebar .sidebar-section {
  padding: 24px;
}


.create-record-modal .modal-header-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #fff;
}

#update-metadata-modal .info-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
}


.info-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}


.settings-modal-card {
  background: #f9fafb;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  border: none;
}

.settings-field label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 6px;
}

.settings-field .form-control,
.settings-field .form-select {
  background: #fff;
  border-color: #d1d5db;
}

#quick-link-name.quick-link-name-highlight {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.45);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.settings-help {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 6px 0 0;
  display: none;
}

.settings-help.is-active {
  display: block;
}


.settings-modal-footer .btn-outline-primary {
  border-color: #93c5fd;
  color: #2563eb;
}

.settings-modal-footer .btn-outline-primary:hover,
.settings-modal-footer .btn-outline-primary:focus,
.settings-modal-footer .btn-outline-primary:active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

#collection-settings-modal .is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

#collection-settings-modal .is-disabled.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  box-shadow: none !important;
}

.settings-tab:hover,
.settings-tab:focus {
  background: transparent;
  color: #111827;
}

.settings-tab.is-active {
  border-bottom-color: #111827;
  color: #111827;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
}

.settings-shell-dialog {
  max-width: min(800px, calc(100vw - 32px));
}

.settings-shell-dialog--wide {
  max-width: min(980px, calc(100vw - 32px));
}

.settings-shell-content {
  display: flex;
  flex-direction: column;
  height: min(82vh, 760px);
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 14px;
  overflow: hidden;
}

.settings-shell-header {
  flex: 0 0 auto;
  align-items: flex-start;
}

.settings-shell-header .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-shell-tabs {
  flex: 0 0 auto;
  background: inherit;
}

.settings-shell-tabs .nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.settings-shell-tabs .nav::-webkit-scrollbar {
  display: none;
}

.settings-shell-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.settings-shell-content .h4 {
  font-size: 1.125rem;
}

.settings-shell-content .h5,
.settings-shell-content .h6 {
  font-size: 0.9375rem;
}

.settings-shell-content .form-label,
.settings-shell-content .form-text,
.settings-shell-content .text-muted,
.settings-shell-content .small {
  font-size: 0.875rem;
}

.settings-shell-content .btn {
  font-size: 0.875rem;
}

.settings-shell-content .card {
  border-color: rgba(17, 24, 39, 0.08);
  box-shadow: none !important;
}

.settings-fields-shell .manage-tags-view {
  max-height: min(56vh, 560px);
  overflow-y: auto;
}

.settings-fields-shell .list-group-item.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.settings-fields-shell .list-group-item.is-active .fw-semibold {
  color: #1d4ed8;
}

.settings-page .results-content {
  height: auto;
}

@media (max-width: 991.98px) {
  .settings-shell-dialog,
  .settings-shell-dialog--wide {
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .settings-shell-header {
    align-items: flex-start;
  }

  .settings-shell-body {
    overflow-y: auto;
  }

  .settings-shell-header .modal-title {
    font-size: 1.125rem;
  }

  .settings-fields-shell .manage-tags-view {
    max-height: 260px;
  }
}

#collection-settings-modal .is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

#collection-settings-modal .is-disabled.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.settings-subfield {
  display: none;
}

.settings-subfield.is-active {
  display: block;
}

.manage-users-role-btn {
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.manage-users-role-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.manage-users-role-btn.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.manage-users-role-btn.is-active:hover,
.manage-users-role-btn.is-active:focus {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.manage-users-role-btn.is-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.merge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

.merge-item img.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.merge-item.is-selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.merge-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.merge-primary {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  color: #2563eb;
  background: #eff6ff;
  opacity: 0;
}

.merge-item.is-selected .merge-primary {
  opacity: 1;
}


.manage-tags-field-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.manage-tags-expanded .manage-tags-field-clamp {
  -webkit-line-clamp: initial;
  overflow: visible;
}

.manage-tags-view .badge {
  background: transparent;
  color: #b45309;
  border-color: #fcd34d;
  font-weight: 500;
  padding: 0 6px;
}

.theme-choice-group .btn-check:checked + .btn,
.theme-choice-group .btn-check:focus + .btn {
  z-index: 1;
}

.theme-choice-group .btn-check:checked + .btn-outline-secondary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .theme-choice-group .btn-outline-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--light-grey-2);
}

html[data-theme="dark"] .theme-choice-group .btn-outline-secondary:hover,
html[data-theme="dark"] .theme-choice-group .btn-outline-secondary:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--light-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .theme-choice-group .btn-check:checked + .btn-outline-secondary,
html[data-theme="dark"] .theme-choice-group .btn-check:checked + .btn-outline-secondary:hover,
html[data-theme="dark"] .theme-choice-group .btn-check:checked + .btn-outline-secondary:focus {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.input-group > #profile-username.form-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group > #profile-username-edit.btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

#manage-tags-modal .form-check-input {
  appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  position: relative;
  cursor: pointer;
}

#manage-tags-modal .form-check-input::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

#manage-tags-modal .form-check-input:checked {
  background: #2563eb;
}

#manage-tags-modal .form-check-input:checked::after {
  transform: translateX(20px);
}



.manage-teams-bs-list.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.manage-users-bs-list.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.modal-sidebar .field-input {
  display: none;
}

.modal-sidebar .ts-wrapper {
  display: none;
}

.modal-sidebar.is-editing .ts-wrapper {
  display: block;
}

.ts-wrapper {
  width: 100%;
}

.field-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-label-icon {
  display: none;
  align-items: center;
  color: #9ca3af;
  order: 2;
}

.field-label-text {
  order: 1;
}

.field-label-help {
  display: inline-flex;
  align-items: center;
  color: #9ca3af;
  cursor: help;
  order: 3;
}

.field-label-help:hover {
  color: #6b7280;
}

.field-multiple-hint {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px dashed #cbd5e1;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  order: 4;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.field-head .form-label {
  margin-bottom: 0;
}

.field-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-toggle-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
}

.field.is-disabled .form-label {
  color: #9ca3af;
}

.field.field-no-delete .ts-control .item .remove.is-locked {
  pointer-events: none;
  opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-control .item[data-value="__multiple__"] {
  background: #f3f4f6;
  border: 1px dashed #cbd5e1;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ts-control .item[data-value="__multiple__"] .remove {
  color: #9ca3af;
}

.ts-dropdown .option[data-value="__multiple__"] {
  display: none;
}

.upload-action-wrap {
  display: inline-flex;
  align-items: stretch;
}

.upload-open.is-disabled,
.upload-open[disabled] {
  opacity: 0.45;
  color: #9ca3af;
  cursor: not-allowed;
}

.bulk-mode-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}

.bulk-mode-card .toggle-pill {
  flex-shrink: 0;
}

.bulk-mode-card .form-select {
  min-width: 170px;
}

.icon-strong {
  stroke-width: 2.5;
}

.modal-sidebar:not(.is-editing) .field-label-help {
  display: none;
}

#create-record-modal .field-label-help,
#update-metadata-modal .field-label-help {
  display: inline-flex;
}

.modal-sidebar.is-editing .field-label-icon {
  display: inline-flex;
}

#create-record-modal .field-label-icon,
#update-metadata-modal .field-label-icon {
  display: inline-flex;
}

.ts-wrapper.form-select,
.ts-wrapper.form-control {
  padding: 4px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.ts-wrapper.form-select .ts-control,
.ts-wrapper.form-control .ts-control {
  border: 0;
  box-shadow: none;
  background: #fff;
  padding: 4px 8px;
  min-height: 36px;
}

.ts-wrapper.form-select .ts-control input,
.ts-wrapper.form-control .ts-control input {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.ts-wrapper .ts-control .item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  line-height: 1.2;
  margin: 2px 4px 2px 0;
}

.ts-wrapper .ts-control .item.is-team {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1d4ed8;
}

.ts-wrapper .ts-control .item.is-team .ts-item-icon {
  color: #1d4ed8;
}

.ts-wrapper .ts-control .item.is-company {
  background: #fef9c3;
  border-color: #fde68a;
  color: #92400e;
}

.select-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-leading-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-leading-icon svg {
  display: block;
}

.form-select.form-select-sm,
.form-control.form-control-sm {
  border-radius: 10px;
  min-height: 38px;
}

.select-with-icon {
  padding-left: 2.25rem;
}


.btn {
  border-radius: 10px;
}

.ts-wrapper .ts-control .item.with-icon {
  gap: 8px;
}

.ts-wrapper .ts-control .item .ts-item-icon,
.ts-dropdown .option .ts-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  width: 16px;
  height: 16px;
}

.ts-wrapper .ts-control .item .ts-item-icon svg,
.ts-dropdown .option .ts-item-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  flex: 0 0 16px;
}

.ts-wrapper .ts-control .item .ts-item-icon.is-team,
.ts-dropdown .option .ts-item-icon {
  margin-right: 6px;
}

.ts-wrapper.multi .ts-control > div{
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
   /* background: #f3f4f6;  */
}

.ts-wrapper .ts-control .item.active {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.ts-wrapper.focus.form-select,
.ts-wrapper.focus.form-control {
  border-color: #94c0ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ts-wrapper.is-invalid {
  border-color: #dc3545;
}

.ts-wrapper.is-invalid .ts-control {
  background: #fff;
}

.ts-dropdown,
.ts-dropdown .ts-dropdown-content {
  background: #fff;
  border-color: #d1d5db;
}

.ts-dropdown .optgroup-header {
  color: #9ca3af;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 8px 4px;
}

.ts-dropdown .optgroup + .optgroup {
  border-top: 1px solid #e5e7eb;
  margin-top: 6px;
  padding-top: 6px;
}
.app-header,
header {
  position: sticky;
  top: 0;
  /* z-index: 5000; */
  z-index:190;
  isolation: isolate;
}

.access-denied-card {
  width: min(840px, 94vw);
}

.access-denied-logo {
  max-height: 160px;
  opacity: 0.8;
}

.text-ink {
  color: #111827;
}

.header-select-all {
  margin-bottom: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.header-select-all * {
  -webkit-user-select: none;
  user-select: none;
}

.header-select-all-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.header-select-all-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.header-select-all-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0.8);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.header-select-all-input:checked + .header-select-all-box {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: none;
}

.header-select-all-input:checked + .header-select-all-box::after {
  opacity: 1;
}

.results-select-all {
  margin-bottom: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.results-select-all * {
  -webkit-user-select: none;
  user-select: none;
}

.results-select-all-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.results-select-all-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.results-select-all-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0.8);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.results-select-all-input:checked + .results-select-all-box {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: none;
}

.results-select-all-input:checked + .results-select-all-box::after {
  opacity: 1;
}

.results-select-all-text {
  font-size: 0.85rem;
  color: #6b7280;
}

html[data-theme="dark"] {
  --dark-black: #1a1a1a;
  --dark-grey-1: #1f1f1f;
  --dark-grey-2: #242424;
  --dark-grey-3: #2b2b2b;
  --dark-grey-4: #323232;
  --dark-grey-5: #3a3a3a;
  --light-white: #ffffff;
  --light-grey-1: #e5e5e5;
  --light-grey-2: #cfcfcf;
  --light-grey-3: #8a8a8a;
  --border: #3a3a3a;
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  --sand: var(--dark-grey-1);
  --ink: var(--light-grey-1);
  --muted: var(--light-grey-3);
}

html[data-theme="dark"] body {
  background: var(--dark-grey-1);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .results-content,
html[data-theme="dark"] .results-inner {
  background: var(--dark-black);
}

html[data-theme="dark"] .sidebar {
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .results-content,
html[data-theme="dark"] .results-inner,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .custom-dropdown,
html[data-theme="dark"] .download-menu,
html[data-theme="dark"] .list-view,
html[data-theme="dark"] .table,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .image-modal-shell,
html[data-theme="dark"] .modal-main,
html[data-theme="dark"] .modal-variations-panel,
html[data-theme="dark"] .modal-versions-panel,
html[data-theme="dark"] .settings-page,
html[data-theme="dark"] .settings-page .results-inner {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .settings-page {
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .bg-sand {
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .bg-white {
  background: var(--dark-grey-2) !important;
}

html[data-theme="dark"] .bg-light {
  background: var(--dark-grey-2) !important;
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer {
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .image-modal-header {
  background: var(--dark-black);
}

html[data-theme="dark"] .image-modal-header.bg-white {
  background: var(--dark-black) !important;
}

/* Public review landing page */
.public-review-page {
  color: #1f2937;
  font-family: inherit;
}

.public-review-page .d-none {
  display: none !important;
}

.public-review-header {
  position: relative;
  z-index: 1;
}

.public-review-header-inner {
  padding: 18px 24px;
}

.public-review-header-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

.public-review-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 40px;
}

.public-review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
}

.public-review-hero-copy {
  max-width: 600px;
}

.public-review-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-review-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.public-review-lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: #5f6877;
  font-size: 1.15rem;
  line-height: 1.65;
}

.public-review-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-top: 34px;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.public-review-benefits div,
.public-review-footer-note,
.public-review-form-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.public-review-benefits svg {
  color: #2563eb;
}

.public-review-card {
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(31, 41, 55, 0.12);
}

.public-review-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.public-review-card h2 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 650;
}

.public-review-card-header p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.public-review-secure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  color: #2563eb;
  background: #eff6ff;
}

.public-review-card .form-label {
  display: block;
  color: #374151;
  font-size: 0.85rem;
}

.public-review-file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.public-review-file-picker:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.public-review-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.public-review-file-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
}

.public-review-file-name {
  overflow: hidden;
  color: #6b7280;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-review-card .form-control {
  min-height: 46px;
  width: 100%;
  display: block;
  min-height: 46px;
  border-color: #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
}

.public-review-card .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.public-review-form-note {
  margin: 2px 0 22px;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.45;
}

.public-review-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-weight: 650;
}

.public-review-footer-note {
  justify-content: center;
  width: 100%;
  margin: 48px 0 0;
  color: #6b7280;
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .public-review-main {
    padding-top: 48px;
  }

  .public-review-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .public-review-hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.4rem);
  }

  .public-review-card {
    max-width: 560px;
  }
}

@media (max-width: 520px) {
  .public-review-header-inner,
  .public-review-main {
    width: calc(100% - 32px);
    padding-left: 0;
    padding-right: 0;
  }

  .public-review-header-inner {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .public-review-main {
    padding-top: 38px;
  }

  .public-review-card {
    padding: 22px;
  }

  .public-review-benefits {
    gap: 12px 16px;
  }
}

html[data-theme="dark"] .public-review-page {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-header,
html[data-theme="dark"] .public-review-card {
  background: var(--dark-grey-2) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .public-review-hero h1,
html[data-theme="dark"] .public-review-card h2,
html[data-theme="dark"] .public-review-card .form-label {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-lead,
html[data-theme="dark"] .public-review-header-label,
html[data-theme="dark"] .public-review-card-header p,
html[data-theme="dark"] .public-review-form-note,
html[data-theme="dark"] .public-review-footer-note {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .public-review-file-picker {
  border-color: var(--border);
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .public-review-file-picker:hover {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
}

html[data-theme="dark"] .public-review-file-action {
  border-color: var(--border);
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}

/* Landing-page composition: centered hero with supporting feature columns. */
.public-review-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.public-review-header-inner > .d-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.public-review-logo {
  display: block;
  width: auto;
  height: 32px;
}

[data-public-review-owner-only] {
  display: none !important;
}

[data-public-review-owner-only].is-public-review-owner {
  display: inline-flex !important;
}

.image-modal-overlay.is-public-review-page.is-public-review-owner .modal-header-actions {
  display: flex !important;
}

.image-modal-overlay.is-public-review-page.is-public-review-owner .modal-header-actions > [data-modal-main-actions] {
  display: flex !important;
}

.image-modal-overlay.is-public-review-page.is-public-review-owner .modal-header-actions > [data-modal-main-actions] > * {
  display: none !important;
}

.image-modal-overlay.is-public-review-page.is-public-review-owner .modal-header-actions > [data-modal-main-actions] > [data-public-review-owner-only].is-public-review-owner {
  display: inline-flex !important;
}

.public-review-header-actions .icon-button {
  color: #374151;
}

.public-review-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  gap: 0;
  text-align: center;
}

.public-review-hero h1 {
  max-width: 1080px;
  font-size: clamp(2.35rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.public-review-lead {
  max-width: 820px;
  margin-top: 10px;
}

.public-review-form {
  width: min(620px, 100%);
  margin-top: 18px;
  text-align: left;
}

.public-review-file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  margin: 0 auto;
}

.public-review-file-picker-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.public-review-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.public-review-file-picker:hover {
  border: 0;
  background: #1d4ed8;
  color: #fff;
}

.public-review-file-picker .public-review-file-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}

.public-review-selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, 80vw);
  padding: 7px 12px 7px 7px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}

.public-review-selected-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 6px;
  object-fit: cover;
}

.public-review-title-row {
  margin-top: 18px;
}

.public-review-title-row .form-label {
  display: block;
  margin-bottom: 7px;
}

.public-review-title-row .form-control {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
}

.public-review-title-row .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.public-review-requirements {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.public-review-requirements-label {
  margin-bottom: 8px;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
}

.public-review-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  color: #4b5563;
  cursor: pointer;
  font-size: 0.88rem;
}

.public-review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.public-review-form-actions .public-review-form-note {
  margin: 0;
}

.public-review-submit {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}

.public-review-main > .public-review-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  width: 100%;
  margin: 112px 0 0;
  color: #374151;
  text-align: left;
}

.public-review-main > .public-review-benefits > div {
  display: block;
  padding-top: 20px;
  border-top: 1px solid #d1d5db;
}

.public-review-main > .public-review-benefits svg {
  color: #2563eb;
  margin-bottom: 18px;
}

.public-review-main > .public-review-benefits h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 650;
}

.public-review-main > .public-review-benefits p {
  max-width: 280px;
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.55;
}

.public-review-footer-note {
  margin-top: 42px;
}

html[data-theme="dark"] .public-review-file-picker {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .public-review-selected-file {
  border-color: var(--border);
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-title-row .form-control {
  border-color: var(--border);
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-requirements {
  border-color: var(--border);
}

html[data-theme="dark"] .public-review-requirements-label,
html[data-theme="dark"] .public-review-toggle-row {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-main > .public-review-benefits {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-main > .public-review-benefits > div {
  border-color: var(--border);
}

html[data-theme="dark"] .public-review-main > .public-review-benefits h2 {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-main > .public-review-benefits p {
  color: var(--light-grey-3);
}

/* Figma-approved public review landing page. */
.public-review-page {
  min-width: 320px;
  margin: 0;
  background: #f8fafc;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.public-review-header,
.public-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 40px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.public-review-footer {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
}

.public-review-header > a,
.public-review-footer > a {
  display: block;
  line-height: 0;
}

.public-review-footer > a img {
  display: block;
  width: 150px;
  height: auto;
}

.public-review-header > a img {
  display: block;
  width: 304px;
  height: auto;
}

.public-review-header nav,
.public-review-footer nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.public-review-header nav a,
.public-review-footer nav a {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.public-review-header nav .public-review-sign-in,
.public-review-footer nav .public-review-sign-in {
  color: #2563eb;
  font-weight: 600;
}

.public-review-header-divider {
  width: 1px;
  height: 16px;
  background: #e5e7eb;
}

.public-review-body {
  width: 100%;
  min-height: calc(100vh - 128px);
  padding: 101px 80px 91px;
  background: #f8fafc;
}

.public-review-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  margin: 0;
  gap: 0;
  text-align: center;
}

.public-review-hero-text {
  width: min(1048px, 100%);
}

.public-review-hero-text h1 {
  margin: 0;
  color: #111827;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 44px;
}

.public-review-hero-text p {
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.public-review-action-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 48px 0 0;
  text-align: center;
}

.public-review-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 560px;
  height: 150px;
  padding: 32px 24px;
  border: 2px dashed #3b82f6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.public-review-dropzone.is-dragging,
.public-review-dropzone:hover {
  background: #eff6ff;
}

.public-review-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: #fff;
}

.public-review-upload-icon img,
.public-review-submit img {
  width: 24px;
  height: 24px;
}

.public-review-drop-title {
  margin-top: 12px;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.public-review-drop-help {
  margin-top: 0;
  color: #9ca3af;
  font-size: 12px;
  line-height: 16px;
}

.public-review-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.public-review-no-account {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 37px;
  padding-top: 12px;
  box-sizing: border-box;
  color: #4b5563;
  font-size: 13px;
  line-height: 16px;
}

.public-review-no-account img {
  width: 14px;
  height: 14px;
}

.public-review-selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 560px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.public-review-selected-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 6px;
  object-fit: cover;
}

.public-review-selected-file .public-review-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #2563eb;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  appearance: none;
  box-shadow: none;
}

.public-review-post-file {
  width: 560px;
  margin-top: 16px;
  text-align: left;
}

.public-review-title-row label,
.public-review-toggle-row {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.public-review-title-row label span {
  color: #6b7280;
  font-weight: 400;
}

.public-review-title-row input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

.public-review-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  cursor: pointer;
}

.public-review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.public-review-form-note {
  color: #9ca3af;
  font-size: 12px;
}

.public-review-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.public-review-submit img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.public-review-main > .public-review-benefits,
.public-review-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  margin: 48px 0 0;
  color: #111827;
  text-align: left;
}

.public-review-benefits article {
  min-width: 0;
  height: 164px;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.public-review-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 20px;
}

.public-review-feature-icon img {
  width: 20px;
  height: 20px;
}

.public-review-feature-icon--blue { background: #eff6ff; }
.public-review-feature-icon--yellow { background: #fef3c7; }
.public-review-feature-icon--green { background: #ecfdf5; }

.public-review-benefits h2 {
  margin: 8px 0 0;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

.public-review-benefits p {
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.public-review-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin: 90px -40px 0;
  padding: 0;
}

.public-review-showcase h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}

.public-review-showcase > img {
  display: block;
  width: min(1360px, 100%);
  height: auto;
  border-radius: 12px;
}

@media (max-width: 800px) {
  .public-review-header,
  .public-review-footer { padding: 0 24px; }
  .public-review-body { padding: 64px 24px 64px; }
  .public-review-hero-text h1 { font-size: 34px; line-height: 40px; }
  .public-review-dropzone,
  .public-review-selected-file,
  .public-review-post-file { width: min(560px, 100%); }
  .public-review-benefits { grid-template-columns: 1fr; }
  .public-review-showcase { margin-right: -24px; margin-left: -24px; padding: 0 24px; }
}

@media (max-width: 560px) {
  .public-review-header nav a:not(.public-review-sign-in),
  .public-review-footer nav a:not(.public-review-sign-in),
  .public-review-header-divider { display: none; }
  .public-review-header > a img,
  .public-review-footer > a img { width: 130px; }
  .public-review-form-actions { align-items: stretch; flex-direction: column; }
  .public-review-submit { justify-content: center; }
}

.public-review-identity-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
}

.public-review-identity-overlay.d-none {
  display: none !important;
}

.public-review-identity-dialog {
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.public-review-identity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.public-review-identity-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 1.2rem;
  font-weight: 600;
}

.public-review-identity-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.public-review-identity-body .form-control {
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.public-review-identity-body .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.public-review-identity-body .form-control.is-invalid {
  border-color: #dc3545;
}

.public-review-identity-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
}

html[data-theme="dark"] .public-review-identity-dialog {
  border-color: var(--border);
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .public-review-identity-header {
  border-color: var(--border);
}

html[data-theme="dark"] .public-review-identity-header h2,
html[data-theme="dark"] .public-review-identity-note {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .public-review-identity-body .form-control {
  border-color: var(--border);
  background: var(--dark-grey-1);
  color: var(--light-grey-1);
}

/* Public reviews keep the decision control visible, but simplify the modal chrome. */
.image-modal-overlay.is-public-review-page #image-modal-back,
.image-modal-overlay.is-public-review-page [data-dam-comment-version],
.image-modal-overlay.is-public-review-page .dam-comment-bookmark-button {
  display: none !important;
}

.image-modal-overlay.is-public-review-page .image-modal-header {
  position: relative;
}

.image-modal-overlay.is-public-review-page .modal-review-dropdown {
  position: absolute !important;
  top: 50%;
  right: 16px;
  z-index: 4;
  transform: translateY(-50%);
}

.image-modal-overlay.is-public-review-page .modal-header-left {
  min-width: 0;
  padding-right: 150px;
}

@media (max-width: 800px) {
  .public-review-main > .public-review-benefits {
    gap: 28px;
    margin-top: 72px;
  }
}

@media (max-width: 600px) {
  .public-review-form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .public-review-submit {
    width: 100%;
  }

  .public-review-main > .public-review-benefits {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 64px;
  }

  .public-review-main > .public-review-benefits > div {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 12px;
  }

  .public-review-main > .public-review-benefits svg {
    grid-row: span 2;
    margin: 2px 0 0;
  }
}

html[data-theme="dark"] .modal-sidebar {
  background: var(--dark-black);
}

html[data-theme="dark"] .modal-sidebar.bg-white {
  background: var(--dark-black) !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-header .modal-title,
html[data-theme="dark"] .modal-header .text-muted,
html[data-theme="dark"] .modal-header .btn-close {
  color: var(--light-grey-1) !important;
}

html[data-theme="dark"] .modal-header .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

html[data-theme="dark"] .manage-tags-shell,
html[data-theme="dark"] .manage-tags-page-card,
html[data-theme="dark"] .manage-tags-card {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .manage-tags-page-header h1,
html[data-theme="dark"] .manage-tags-page-header .text-muted,
html[data-theme="dark"] .manage-tags-help {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .manage-tags-view .list-group,
html[data-theme="dark"] .manage-tags-view .list-group-item {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .manage-tags-view .list-group-item .text-muted,
html[data-theme="dark"] .manage-tags-view .list-group-item small {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .manage-tags-view .badge.text-bg-light {
  background: transparent !important;
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
}

html[data-theme="dark"] #manage-tags-modal .form-check-input {
  background-color: var(--dark-grey-3);
}

html[data-theme="dark"] #manage-tags-modal .form-check-input:checked {
  background-color: #2563eb;
}

html[data-theme="dark"] #manage-tags-modal .form-check-label {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .settings-page .add-collection-search,
html[data-theme="dark"] .settings-shell-content .add-collection-search {
  background: var(--dark-grey-2);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .settings-page .add-collection-search .icon-sm,
html[data-theme="dark"] .settings-shell-content .add-collection-search .icon-sm {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .settings-page .add-collection-search .form-control,
html[data-theme="dark"] .settings-shell-content .add-collection-search .form-control {
  background: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .settings-page .add-collection-search .form-control::placeholder,
html[data-theme="dark"] .settings-shell-content .add-collection-search .form-control::placeholder {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .settings-page .add-collection-list,
html[data-theme="dark"] .settings-shell-content .add-collection-list {
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .settings-page .add-collection-check,
html[data-theme="dark"] .settings-shell-content .add-collection-check {
  border-color: var(--border);
}

html[data-theme="dark"] .settings-page .add-collection-row.is-selected .add-collection-check,
html[data-theme="dark"] .settings-shell-content .add-collection-row.is-selected .add-collection-check {
  background: #2563eb;
  border-color: #2563eb;
}

html[data-theme="dark"] .manage-users-role-btn {
  color: var(--light-grey-2);
  border-color: var(--border);
  background: transparent;
}

html[data-theme="dark"] .manage-users-role-btn:not(.is-active):hover,
html[data-theme="dark"] .manage-users-role-btn:not(.is-active):focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--light-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .manage-users-role-btn.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .manage-users-role-btn.is-active:hover,
html[data-theme="dark"] .manage-users-role-btn.is-active:focus {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .manage-users-role-btn.is-disabled {
  background: var(--dark-grey-3);
  color: var(--light-grey-3);
  border-color: var(--border);
}

html[data-theme="dark"] .manage-users-bs-list,
html[data-theme="dark"] .manage-users-bs-list .add-collection-row {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .manage-teams-bs-list,
html[data-theme="dark"] .manage-teams-bs-list .add-collection-row {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .manage-users-bs-list .add-collection-row:hover,
html[data-theme="dark"] .manage-users-bs-list .add-collection-row.is-selected {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .manage-teams-bs-list .add-collection-row:hover,
html[data-theme="dark"] .manage-teams-bs-list .add-collection-row.is-selected {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .manage-users-bs-list .add-collection-name,
html[data-theme="dark"] .manage-teams-bs-list .add-collection-name {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .form-select option,
html[data-theme="dark"] select.form-select option {
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .form-control::placeholder {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .btn-ghost {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .btn-ghost:hover {
  background: var(--dark-grey-3);
  border-color: transparent;
}

html[data-theme="dark"] .btn-tertiary {
  border-color: var(--border);
  background: var(--dark-grey-2);
  color: var(--light-grey-2);
}

html[data-theme="dark"] .btn-tertiary:hover,
html[data-theme="dark"] .btn-tertiary:focus,
html[data-theme="dark"] .btn-tertiary:active {
  border-color: var(--light-grey-4);
  background: var(--dark-grey-3);
  color: var(--light-white);
}

html[data-theme="dark"] header,
html[data-theme="dark"] .sidebar {
  background: var(--dark-black) !important;
}

html[data-theme="dark"] header.bg-white {
  background: var(--dark-black) !important;
}

html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-end,
html[data-theme="dark"] .border-start {
  border-color: var(--border) !important;
}

html[data-theme="dark"] .text-dark {
  color: var(--light-grey-1) !important;
}

html[data-theme="dark"] .text-muted {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .text-secondary {
  color: var(--light-grey-2) !important;
}

html[data-theme="dark"] .results-select-all-box {
  background: var(--dark-grey-2);
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px var(--dark-grey-3);
}

html[data-theme="dark"] .results-select-all-input:checked + .results-select-all-box {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: none;
}

html[data-theme="dark"] .results-select-all-text {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .header-search {
  background: var(--dark-grey-2) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .sidebar {
  background: var(--dark-black);
  border-right-color: var(--border);
}

html[data-theme="dark"] .section-toggle,
html[data-theme="dark"] .sub-toggle,
html[data-theme="dark"] .tree-item {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .section-toggle:hover,
html[data-theme="dark"] .sub-toggle:hover,
html[data-theme="dark"] .tree-item:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .quick-link-leaf-meta {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .sub-toggle + .section-panel.is-open::before,
html[data-theme="dark"] .sidebar-collection-row:has(.sub-toggle) + .section-panel.is-open::before {
  background: var(--border);
}

html[data-theme="dark"] .section-toggle[data-sidebar-id="favorites"] + .section-panel.is-open::before,
html[data-theme="dark"] .section-toggle[data-sidebar-id="quick-links"] + .section-panel.is-open::before,
html[data-theme="dark"] .section-toggle[data-sidebar-id="collections"] + .section-panel.is-open::before,
html[data-theme="dark"] .sidebar-collection-row:has([data-sidebar-id="collections"]) + .section-panel.is-open::before,
html[data-theme="dark"] .sidebar-collection-row:has([data-sidebar-id="quick-links"]) + .section-panel.is-open::before,
html[data-theme="dark"] .section-toggle[data-sidebar-id="settings-my"] + .section-panel.is-open::before,
html[data-theme="dark"] .section-toggle[data-sidebar-id="settings-org"] + .section-panel.is-open::before {
  background: var(--border);
}

html[data-theme="dark"] .tree-item.is-active {
  color: var(--light-white);
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .results-content {
  background: var(--dark-black);
}

html[data-theme="dark"] .list-view,
html[data-theme="dark"] .list-view .dropdown-menu,
html[data-theme="dark"] .custom-dropdown,
html[data-theme="dark"] .download-menu {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] #list-view {
  background: var(--dark-grey-2) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] #list-view .list-controls {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] #list-view .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--light-grey-1);
  --bs-table-border-color: var(--border);
  margin-bottom: 0;
}

html[data-theme="dark"] #list-view .table-light,
html[data-theme="dark"] #list-view .table-light th {
  background: var(--dark-grey-3) !important;
  color: var(--light-grey-2) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] #list-view .table thead th {
  color: var(--light-grey-3);
  border-bottom-color: var(--border);
}

html[data-theme="dark"] #list-view .table tbody td {
  color: var(--light-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] #list-view .table tbody tr:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] #list-view .result-checkbox {
  accent-color: #3b82f6;
}

html[data-theme="dark"] #list-view .thumb {
  border-color: var(--border);
  background: var(--dark-grey-1);
}

html[data-theme="dark"] #list-view .pill {
  background: var(--dark-grey-3);
  color: var(--light-grey-2);
}

html[data-theme="dark"] .custom-dropdown .dropdown-item,
html[data-theme="dark"] .download-menu-item {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .header-megamenu {
  border-color: var(--border);
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .header-megamenu-title {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .header-megamenu-link-meta {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .header-megamenu .text-secondary-emphasis,
html[data-theme="dark"] .header-megamenu-more {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .header-megamenu .dropdown-item {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .header-megamenu .dropdown-item:hover,
html[data-theme="dark"] .header-megamenu .dropdown-item:focus,
html[data-theme="dark"] .header-megamenu .dropdown-item:active {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .header-megamenu .collection-count-badge {
  background: var(--dark-grey-3) !important;
  color: var(--light-grey-1) !important;
  border-color: var(--border) !important;
}

@media (min-width: 1200px) {
  html[data-theme="dark"] .header-megamenu-grid > .col + .col .header-megamenu-section {
    border-left-color: var(--border);
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  html[data-theme="dark"] .header-megamenu-grid > .col:nth-child(2n) .header-megamenu-section {
    border-left-color: var(--border);
  }

  html[data-theme="dark"] .header-megamenu-grid > .col:nth-child(n + 3) .header-megamenu-section {
    border-top-color: var(--border);
  }
}

@media (max-width: 767.98px) {
  html[data-theme="dark"] .header-megamenu-grid > .col + .col .header-megamenu-section {
    border-top-color: var(--border);
  }
}


html[data-theme="dark"] .variation-preview {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-title {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-title-prefix,
html[data-theme="dark"] .modal-title-name {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-title-prefix {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .variation-header,
html[data-theme="dark"] .variation-title-row .variation-title {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-header .link {
  color: var(--light-grey-2) !important;
}

html[data-theme="dark"] .variation-meta,
html[data-theme="dark"] .variation-meta-secondary,
html[data-theme="dark"] .variation-meta span {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .variation-meta span {
  font-weight: 600;
}


html[data-theme="dark"] .icon-button {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .icon-button:hover {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .custom-dropdown .dropdown-item:hover,
html[data-theme="dark"] .custom-dropdown .dropdown-item.active,
html[data-theme="dark"] .custom-dropdown .dropdown-item.active:hover,
html[data-theme="dark"] .custom-dropdown .dropdown-item.active:focus,
html[data-theme="dark"] .download-menu-item:hover,
html[data-theme="dark"] .download-menu-item:focus,
html[data-theme="dark"] .download-menu-item:focus-visible {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .image-card {
  background: var(--dark-grey-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .image-card img.fit-mode {
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .image-card .check-toggle {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .image-card .check-toggle i,
html[data-theme="dark"] .image-card .check-toggle svg {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .image-card.is-checked .check-toggle {
  background: #2563eb;
  box-shadow: none;
}

html[data-theme="dark"] .image-card.is-checked::after {
  box-shadow: inset 0 0 0 5px #2563eb;
}

html[data-theme="dark"] .results-toolbar-actions .icon-button.is-active {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .action-bar {
  background: #000;
}

html[data-theme="dark"] .action-bar-summary,
html[data-theme="dark"] .action-bar-summary span,
html[data-theme="dark"] .action-bar-controls > .icon-button,
html[data-theme="dark"] .action-bar-controls > .download-dropdown > .icon-button,
html[data-theme="dark"] .action-bar-controls > button.icon-button {
  color: #fff !important;
}

html[data-theme="dark"] .action-bar .icon-button {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .action-bar .icon-button:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .action-bar .divider {
  background: var(--border);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .download-menu-label {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .action-bar [data-action-review].is-open > .icon-button {
  background: var(--dark-grey-3);
  color: var(--light-white);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] {
  background: var(--dark-grey-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .border-top {
  border-top-color: var(--border) !important;
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action i,
html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action svg {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action:hover i,
html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action:hover svg,
html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action:focus i,
html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action:focus svg {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action.is-rejected {
  color: #f87171;
}

html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action.is-rejected:hover,
html[data-theme="dark"] .action-bar [data-action-review-menu] .review-action.is-rejected:focus {
  background: rgba(239, 68, 68, 0.14) !important;
}

html[data-theme="dark"] .action-bar [data-action-delete].is-open > .icon-button {
  background: var(--dark-grey-3);
  color: var(--light-white);
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] {
  background: var(--dark-grey-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .border-top {
  border-top-color: var(--border) !important;
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item i,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item svg {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item:hover i,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item:hover svg,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item:focus i,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item:focus svg {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item.text-danger {
  color: #f87171 !important;
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item.text-danger i,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item.text-danger svg {
  color: #f87171 !important;
}

html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item.text-danger:hover,
html[data-theme="dark"] .action-bar [data-action-delete-menu] .download-menu-item.text-danger:focus {
  background: rgba(239, 68, 68, 0.14) !important;
}

html[data-theme="dark"] .modal-review-dropdown .modal-status-pill {
  box-shadow: none;
}

html[data-theme="dark"] .modal-review-dropdown .modal-status-pill.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

html[data-theme="dark"] .modal-review-dropdown.is-open .modal-status-pill {
  box-shadow: 0 0 0 1px var(--border);
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] {
  background: var(--dark-grey-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .download-menu-label {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action i,
html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action svg {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action:hover i,
html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action:hover svg,
html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action:focus i,
html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action:focus svg {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action.is-rejected {
  color: #f87171;
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action.is-rejected:hover,
html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .review-action.is-rejected:focus {
  background: rgba(239, 68, 68, 0.14) !important;
}

html[data-theme="dark"] .modal-review-dropdown [data-modal-review-menu] .border-top {
  border-top-color: var(--border) !important;
}

html[data-theme="dark"] .image-card .check-toggle {
  box-shadow: none;
}

html[data-theme="dark"] .app-toast {
  --toast-bg: var(--dark-grey-3);
  --toast-text: var(--light-grey-1);
  --toast-border: var(--border);
  --toast-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .filter-tag-row .filter-pill {
  border-color: var(--border);
}

html[data-theme="dark"] #update-metadata-modal .bulk-mode-card {
  background: var(--dark-grey-3);
  border-color: var(--border);
}

html[data-theme="dark"] #update-metadata-modal #update-metadata-mode-copy {
  color: var(--light-grey-2) !important;
}

html[data-theme="dark"] [data-filter-button].icon-button.is-active {
  border-color: var(--border);
}

html[data-theme="dark"] .filter-modal {
  background: var(--dark-grey-2);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .filter-dropdown-menu {
  background: transparent;
  border: 0;
  box-shadow: none;
}

html[data-theme="dark"] .filter-drawer-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .filter-drawer {
  background: var(--dark-black);
  border-left-color: var(--border);
}

html[data-theme="dark"] .filter-drawer .modal-footer {
  border-top-color: var(--border);
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .filter-modal .modal-header {
  border-bottom-color: var(--border);
}

html[data-theme="dark"] .filter-section + .filter-section {
  border-top-color: var(--border);
}

html[data-theme="dark"] .filter-section-toggle {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .filter-drawer .filter-section-title {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .filter-section-toggle:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .filter-section-title {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .filter-grid-label {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .filter-facet-heading {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .filter-facet-heading-toggle {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .filter-facet-heading-text {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .filter-facet-item.is-active .filter-checkbox-icon {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

html[data-theme="dark"] .filter-facet-item.is-disabled {
  opacity: 0.35;
}

html[data-theme="dark"] .filter-facet-extra {
  color: #facc15;
}

html[data-theme="dark"] .filter-option-row:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .filter-option-row.is-active {
  background: rgba(59, 130, 246, 0.22);
}

html[data-theme="dark"] .filter-checkbox-icon {
  border-color: var(--light-grey-2);
  background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .filter-option-row.is-disabled .filter-checkbox-icon {
  border-color: var(--light-grey-4);
  background: transparent;
}

html[data-theme="dark"] .filter-checkbox-row input[type="checkbox"]:checked + .filter-checkbox-icon {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

html[data-theme="dark"] .filter-tag-row .filter-pill,
html[data-theme="dark"] .filter-tag-row .filter-pill .icon-sm {
  color: var(--light-grey-1);
}

html[data-theme="dark"] [data-filter-button].icon-button .filter-count-badge {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] [data-filter-clear]:hover {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] header.border-bottom,
html[data-theme="dark"] .image-modal-header.border-bottom {
  border-bottom-color: #000 !important;
}

html[data-theme="dark"] .sidebar {
  border-right-color: #000;
}

html[data-theme="dark"] .modal-sidebar.border-start {
  border-left-color: #000 !important;
}

html[data-theme="dark"] .modal-variations-panel,
html[data-theme="dark"] .modal-versions-panel {
  border-left-color: #000 !important;
}

html[data-theme="dark"] .settings-page,
html[data-theme="dark"] .settings-page .results-inner {
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .settings-page .settings-sidebar-title {
  border-color: var(--border) !important;
}

html[data-theme="dark"] .settings-shell-content,
html[data-theme="dark"] .settings-shell-tabs {
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .settings-shell-content .card,
html[data-theme="dark"] .settings-shell-content .card-body,
html[data-theme="dark"] .settings-shell-content .card-header {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .settings-shell-tabs .settings-tab {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .settings-shell-tabs .settings-tab:hover,
html[data-theme="dark"] .settings-shell-tabs .settings-tab:focus {
  background: transparent;
  color: var(--light-grey-1);
}

html[data-theme="dark"] .settings-shell-tabs .settings-tab.is-active {
  background: transparent;
  border-bottom-color: var(--light-white);
  color: var(--light-white);
}

html[data-theme="dark"] .settings-fields-shell .list-group-item.is-active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.32);
}

html[data-theme="dark"] .settings-fields-shell .list-group-item.is-active .fw-semibold {
  color: #bfdbfe;
}

html[data-theme="dark"] .settings-page .settings-panel .card,
html[data-theme="dark"] .settings-page .settings-panel .card-body,
html[data-theme="dark"] .settings-page .settings-panel .card-header {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .settings-page .form-check-input {
  background-color: var(--dark-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .settings-page .form-check-input:checked {
  background-color: var(--dark-grey-3);
  border-color: var(--light-grey-2);
}

html[data-theme="dark"] .image-modal-shell,
html[data-theme="dark"] .modal-main,
html[data-theme="dark"] .modal-variations-panel,
html[data-theme="dark"] .modal-versions-panel {
  background: var(--dark-black);
  border-color: var(--border);
}

html[data-theme="dark"] .modal-variations-preview,
html[data-theme="dark"] .modal-versions-preview {
  background: var(--dark-black);
}

html[data-theme="dark"] .modal-image-area {
  background: var(--dark-black);
}

html[data-theme="dark"] .modal-view-crop,
html[data-theme="dark"] .modal-crop-canvas,
html[data-theme="dark"] .modal-crop-sidebar {
  background: var(--dark-black);
}

html[data-theme="dark"] .modal-crop-image-wrap {
  background: var(--dark-black);
}

html[data-theme="dark"] .crop-dimensions-card {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .modal-crop-hint {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .cropper-modal {
  background-color: rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .cropper-view-box {
  outline-color: rgba(255, 255, 255, 0.35);
}

html[data-theme="dark"] .cropper-face {
  background-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .create-record-image {
  background: var(--dark-grey-2) !important;
}

html[data-theme="dark"] .create-record-placeholder {
  background: var(--dark-grey-1);
  color: var(--light-grey-3);
}

html[data-theme="dark"] .create-record-modal .modal-header-actions .btn:disabled {
  background: var(--dark-grey-3);
  color: var(--light-grey-3);
  border-color: var(--border);
  cursor: not-allowed;
}

html[data-theme="dark"] .modal-image-wrap img {
  filter: brightness(0.98);
}

html[data-theme="dark"] .modal-variations-header,
html[data-theme="dark"] .modal-versions-header {
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .modal-variations-header {
  border-bottom: none;
}

html[data-theme="dark"] .modal-variations-list,
html[data-theme="dark"] .modal-versions-list {
  background: var(--dark-black);
}

html[data-theme="dark"] .modal-versions-compare {
  background: var(--dark-black);
}

html[data-theme="dark"] .version-compare-image-wrap {
  background: var(--dark-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .variation-row,
html[data-theme="dark"] .version-row {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .variation-row.is-primary,
html[data-theme="dark"] .modal-variations.is-split .variation-row:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .version-row.is-current,
html[data-theme="dark"] .modal-versions.is-split .version-row:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .modal-versions.is-split .version-row.is-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

html[data-theme="dark"] .variation-thumbs img,
html[data-theme="dark"] .variation-thumb {
  border-color: var(--border);
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .version-thumb {
  border-color: var(--border);
  background: var(--dark-grey-1);
}

html[data-theme="dark"] .version-title {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .version-meta {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .version-meta span {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .privacy-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

html[data-theme="dark"] .privacy-icon.is-public {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

html[data-theme="dark"] .privacy-icon.is-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #facc15;
}

html[data-theme="dark"] .modal-version-pill {
  color: var(--light-grey-3);
  background: var(--dark-grey-2);
  border: none;
}

html[data-theme="dark"] .variation-crop-badge {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-crop-toggle {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .variation-crop-toggle:hover,
html[data-theme="dark"] .variation-crop-toggle:focus {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-row.is-crop .crop-lead {
  color: var(--light-grey-3);
}


html[data-theme="dark"] .variation-row .btn.btn-outline-secondary {
  background: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .version-row .btn.btn-outline-secondary {
  background: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-variations.is-split .variation-row:hover .btn.btn-outline-secondary,
html[data-theme="dark"] .modal-variations.is-split .variation-row.is-selected .btn.btn-outline-secondary {
  background: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-versions.is-split .version-row:hover .btn.btn-outline-secondary,
html[data-theme="dark"] .modal-versions.is-split .version-row.is-selected .btn.btn-outline-secondary {
  background: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-variations.is-split .variation-row:hover .btn.btn-outline-secondary:hover,
html[data-theme="dark"] .modal-variations.is-split .variation-row.is-selected .btn.btn-outline-secondary:hover {
  background: var(--dark-grey-1);
  border-color: var(--light-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-versions.is-split .version-row:hover .btn.btn-outline-secondary:hover,
html[data-theme="dark"] .modal-versions.is-split .version-row.is-selected .btn.btn-outline-secondary:hover {
  background: var(--dark-grey-1);
  border-color: var(--light-grey-3);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-row .btn.btn-outline-secondary.is-disabled,
html[data-theme="dark"] .variation-row .btn.btn-outline-secondary:disabled {
  opacity: 0.55;
}

html[data-theme="dark"] .variation-more-menu {
  background: var(--dark-grey-2);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .variation-status-menu {
  background: var(--dark-grey-2);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .variation-more-menu button {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-more-menu button:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .variation-status-badge {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(103, 232, 249, 0.28);
}

html[data-theme="dark"] .variation-status-badge.changes {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
}

html[data-theme="dark"] #merge-variations-modal .modal-content,
html[data-theme="dark"] #merge-variations-modal .modal-header,
html[data-theme="dark"] #merge-variations-modal .modal-body,
html[data-theme="dark"] #merge-variations-modal .modal-footer {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] #merge-variations-modal .text-muted {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] #merge-variations-modal .merge-item {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] #merge-variations-modal .merge-item:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] #merge-variations-modal .merge-item img.thumb {
  border-color: var(--border);
  background: var(--dark-grey-1);
}

html[data-theme="dark"] #merge-variations-modal .merge-item.is-selected {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
}

html[data-theme="dark"] #merge-variations-modal .merge-primary {
  border-color: #60a5fa;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.18);
}

html[data-theme="dark"] .variation-status-badge.rejected {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(252, 165, 165, 0.28);
}

html[data-theme="dark"] .variation-status-badge.approved {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(110, 231, 183, 0.28);
}

html[data-theme="dark"] .variation-mismatch-badge {
  background: rgba(217, 119, 6, 0.22);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.32);
}

html[data-theme="dark"] .variation-size-conflict-badge {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}


html[data-theme="dark"] .variation-status-menu button {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .variation-status-menu button:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .custom-menu-item.is-disabled,
html[data-theme="dark"] .custom-menu-item:disabled {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .variation-mismatch-badge {
  background: #ef4444;
  color: #fff;
}

html[data-theme="dark"] .variation-status-menu .review-action.is-rejected {
  color: #f87171;
}

html[data-theme="dark"] .variation-status-menu .review-action.is-rejected:hover,
html[data-theme="dark"] .variation-status-menu .review-action.is-rejected:focus {
  background: rgba(239, 68, 68, 0.14);
}

html[data-theme="dark"] .download-menu-item:hover,
html[data-theme="dark"] .download-menu-item:focus,
html[data-theme="dark"] .download-menu-item:focus-visible {
  background: var(--dark-grey-3) !important;
  color: var(--light-grey-1);
}

html[data-theme="dark"] .download-menu-label {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .download-menu .border-top {
  border-top-color: var(--border) !important;
}

html[data-theme="dark"] .version-row.version-row-deleted {
  color: var(--light-grey-3);
}

html[data-theme="dark"] .modal-sidebar .field-input,
html[data-theme="dark"] .modal-sidebar .ts-wrapper,
html[data-theme="dark"] .modal-sidebar .ts-control,
html[data-theme="dark"] .modal-sidebar .ts-dropdown {
  background-color: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .modal-sidebar .ts-control input {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .login-page {
  background: var(--dark-grey-1) !important;
}

html[data-theme="dark"] .login-card {
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
  border: 1px solid var(--border);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .login-card .form-label,
html[data-theme="dark"] .login-card .form-check-label {
  color: var(--light-grey-2);
}

html[data-theme="dark"] .login-card .alert {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .add-collection-modal {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .add-collection-modal .modal-header,
html[data-theme="dark"] .add-collection-modal .modal-body,
html[data-theme="dark"] .add-collection-modal .modal-footer {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .add-collection-modal .add-collection-search {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .add-collection-modal .add-collection-search input {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .add-collection-modal .add-collection-list {
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .add-collection-modal .add-collection-row {
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .add-collection-modal .add-collection-row:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .add-collection-modal .add-collection-row.is-selected {
  border-color: #2563eb;
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .add-collection-modal .add-collection-check {
  border-color: var(--border);
}

html[data-theme="dark"] .add-collection-modal .add-collection-name {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .add-collection-modal .add-collection-meta,
html[data-theme="dark"] .add-collection-modal .text-muted {
  color: var(--light-grey-3) !important;
}

html[data-theme="dark"] .ts-dropdown .option,
html[data-theme="dark"] .ts-dropdown .optgroup-header {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-dropdown .option.active,
html[data-theme="dark"] .ts-dropdown .option:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .ts-wrapper.form-select,
html[data-theme="dark"] .ts-wrapper.form-control {
  background: var(--dark-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .ts-wrapper.form-select .ts-control,
html[data-theme="dark"] .ts-wrapper.form-control .ts-control {
  background: var(--dark-grey-1);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-wrapper.form-select .ts-control input,
html[data-theme="dark"] .ts-wrapper.form-control .ts-control input {
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-wrapper .ts-control .item {
  background: var(--dark-grey-3);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-wrapper .ts-control .item.is-team {
  background: var(--dark-grey-3);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-wrapper .ts-control .item.is-company {
  background: var(--dark-grey-3);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .ts-dropdown,
html[data-theme="dark"] .ts-dropdown .ts-dropdown-content {
  background: var(--dark-grey-2);
  border-color: var(--border);
}

html[data-theme="dark"] .ts-dropdown .optgroup-header {
  color: var(--light-grey-3);
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .ts-dropdown .optgroup + .optgroup {
  border-top-color: var(--border);
}

html[data-theme="dark"] .image-card .overlay-actions .icon-button {
  background: var(--dark-grey-1);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .image-card .overlay-actions .icon-button:hover {
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .download-status[data-tooltip]::after,
html[data-theme="dark"] .download-menu-item[data-tooltip]::after {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
  border: 1px solid var(--border);
}

html[data-theme="dark"] .download-status[data-tooltip]::before,
html[data-theme="dark"] .download-menu-item[data-tooltip]::before {
  border-top-color: var(--dark-grey-3);
}

html[data-theme="dark"] .tooltip .tooltip-inner {
  background: var(--dark-grey-3);
  color: var(--light-grey-1);
  border: 1px solid var(--border);
}

html[data-theme="dark"] .tooltip {
  --bs-tooltip-bg: var(--dark-grey-3);
  --bs-tooltip-color: var(--light-grey-1);
}

html[data-theme="dark"] .bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--dark-grey-3);
}

html[data-theme="dark"] .bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--dark-grey-3);
}

html[data-theme="dark"] .bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--dark-grey-3);
}

html[data-theme="dark"] .bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--dark-grey-3);
}

html[data-theme="dark"] .icon-button:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .sidebar-toggle.icon-button:hover,
html[data-theme="dark"] .results-toolbar-actions .icon-button:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .upload-page .upload-panel,
html[data-theme="dark"] .upload-page .upload-table-wrap,
html[data-theme="dark"] .upload-page .table,
html[data-theme="dark"] .upload-page .table thead,
html[data-theme="dark"] .upload-page .table tbody,
html[data-theme="dark"] .upload-page .table tr,
html[data-theme="dark"] .upload-page .table td,
html[data-theme="dark"] .upload-page .table th {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .upload-page .upload-panel {
  border-color: var(--dark-grey-3) !important;
}

html[data-theme="dark"] .upload-page .upload-empty {
  border-color: var(--dark-grey-3) !important;
  background: var(--dark-grey-2);
}

html[data-theme="dark"] .upload-page .btn-outline-secondary {
  color: var(--light-grey-1);
  border-color: var(--border);
}

html[data-theme="dark"] .upload-page .btn-outline-secondary:hover {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus,
html[data-theme="dark"] .btn-outline-secondary:active,
html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus,
html[data-theme="dark"] .btn-outline-primary:active,
html[data-theme="dark"] .btn-dark:hover,
html[data-theme="dark"] .btn-dark:focus,
html[data-theme="dark"] .btn-dark:active {
  background: var(--dark-grey-3);
  border-color: var(--border);
  color: var(--light-grey-1);
}

html[data-theme="dark"] .btn-outline-secondary {
  background: var(--dark-grey-3);
  border-color: transparent;
  color: var(--light-grey-1);
}

html[data-theme="dark"] .toggle-pill {
  background: var(--dark-grey-3);
}

html[data-theme="dark"] .toggle-pill span {
  background: var(--light-grey-1);
}

html[data-theme="dark"] .toggle-pill.is-active {
  background: #2563eb;
}

html[data-theme="dark"] .toggle-pill.is-active span {
  background: #ffffff;
}

.toggle-pill.is-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus,
html[data-theme="dark"] .btn-outline-secondary:active {
  background: var(--dark-grey-3);
  border-color: transparent;
}

button:not(.toggle-pill):not(.settings-tab):not(.tab-button):not(.btn-xs),
.btn:not(.btn-xs),
.btn-ghost:not(.btn-xs),
.icon-button,
.form-control,
.form-select,
.ts-wrapper.form-select,
.ts-wrapper.form-control,
.ts-wrapper.form-select .ts-control,
.ts-wrapper.form-control .ts-control {
  border-radius: 8px !important;
}

.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) > .btn,
.input-group > .btn:not(:first-child),
.input-group > .btn-group:not(:first-child) > .btn,
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:last-child) > .btn,
.input-group > .btn:not(:last-child):not(.dropdown-toggle),
.input-group > .btn-group:not(:last-child) > .btn,
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.theme-choice-group > .btn-check + .btn {
  border-radius: 0 !important;
}

#rights-usage-modal .dam-date-clear {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

#rights-usage-modal .dam-date-clear:hover,
#rights-usage-modal .dam-date-clear:focus-visible {
  color: var(--bs-body-color, #212529);
}

html[data-theme="dark"] #rights-usage-modal .dam-date-clear {
  color: var(--light-grey-2);
}

html[data-theme="dark"] #rights-usage-modal .dam-date-clear:hover,
html[data-theme="dark"] #rights-usage-modal .dam-date-clear:focus-visible {
  color: var(--light-white);
}

.theme-choice-group > .btn-check:first-of-type + .btn {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
}

.theme-choice-group > .btn-check:last-of-type + .btn {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}
.dam-rights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.dam-rights-grid label:last-child {
  grid-column: 1 / -1;
}
.dam-comments-list {
  max-height: 240px;
  overflow-y: auto;
}
.modal-comments {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.modal-comments-preview {
  display: flex;
  flex: 1 1 60%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--dark-black, #f8f9fa);
}
.modal-comments-image-wrap {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.modal-comments-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-comments-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dam-comment-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  background: var(--bs-primary, #0d6efd);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.dam-comment-marker.is-pending {
  background: #f59f00;
}
.dam-comment-marker.is-resolved-annotation {
  opacity: 0;
  pointer-events: none;
}
.dam-comment-marker.is-resolved-annotation.is-hovered {
  opacity: .42;
  pointer-events: auto;
}
.dam-comment-inline-marker {
  position: static;
  display: inline-flex;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  margin-left: 0;
  padding: 0;
  vertical-align: middle;
  transform: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}
.modal-comments-panel {
  flex: 0 0 min(460px, 44%);
  min-width: 360px;
  background: var(--bs-body-bg, #fff);
  border-left: 1px solid var(--bs-border-color, #dee2e6);
}
.modal-comments-panel .dam-comments-list {
  max-height: none;
}
.modal-comments-filter-row > .form-control {
  flex: 1 1 220px;
  min-width: 0;
}
.modal-comments-filter-row > .form-select {
  flex: 0 1 150px;
  min-width: 120px;
  width: 100%;
}
.dam-comment-composer {
  position: relative;
}
.dam-comment {
  position: relative;
  margin-left: 0;
  padding: 10px 0 8px;
  transition: background-color .15s ease, opacity .15s ease;
}
.dam-comment.is-dropdown-open {
  z-index: 10002;
}
.dam-comment:has(> .dam-comment-reply-form:not(.d-none) > .dam-comment)::after {
  position: absolute;
  top: 40px;
  bottom: 8px;
  left: 15px;
  width: 1px;
  background: color-mix(in srgb, var(--bs-secondary-color, #6c757d) 24%, transparent);
  content: '';
  pointer-events: none;
}
.dam-comment-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.dam-comment-header-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.dam-comment-header-actions {
  position: absolute;
  z-index: 10000;
  top: -4px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.dam-comment-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8dc67;
  color: #313131;
  font-size: 11px;
  font-weight: 700;
}
.dam-comment.is-resolved {
  opacity: .48;
}
.dam-comment.is-pinned {
  background: color-mix(in srgb, #f8dc67 13%, transparent);
  border-left: 3px solid #e3b91d;
  padding-left: 8px;
}
.dam-comment-pin {
  color: #b98a00;
  flex: 0 0 auto;
}
.dam-comment-bookmark {
  color: var(--bs-primary, #0d6efd);
  flex: 0 0 auto;
}
.dam-comment-bookmark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 27px;
  height: 27px;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
}
.dam-comment-bookmark-button:hover,
.dam-comment-bookmark-button:focus-visible {
  background: var(--bs-tertiary-bg, #f2f4f7);
  color: var(--bs-secondary-color, #6c757d);
}
.dam-comment-bookmark-button.is-bookmarked {
  color: var(--bs-secondary-color, #6c757d);
}
.dam-comment-bookmark-button.is-bookmarked svg {
  fill: currentColor;
}
.dam-comment-time {
  position: relative;
  font-size: .75rem !important;
  opacity: .72;
}
.dam-comment-time:hover::after {
  content: attr(data-exact-time);
  position: absolute;
  z-index: 10;
  left: 0;
  top: calc(100% + 5px);
  min-width: max-content;
  padding: 4px 7px;
  border-radius: 5px;
  background: #212529;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.dam-comment-resolve {
  color: var(--bs-secondary-color, #6c757d) !important;
}
.dam-comment-resolve.is-resolved {
  color: var(--bs-success, #198754) !important;
}
.dam-comment.is-highlighted {
  background: rgba(13, 110, 253, .14);
  outline: 2px solid rgba(13, 110, 253, .35);
  border-radius: 8px;
}
.dam-comment-hover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  opacity: .62;
  transition: opacity .12s ease;
}
.dam-comment-reactions,
.dam-comment-hover-actions > .dam-comment-resolve,
.dam-comment-hover-actions > .dam-comment-menu-wrap {
  position: relative;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background-color .12s ease, border-color .12s ease;
}
.dam-comment-hover-actions:hover {
  opacity: 1;
}
.dam-comment-hover-actions:has(.dam-reaction-options.is-forced-open),
.dam-comment-hover-actions:has(.dam-comment-menu:not(.d-none)) {
  opacity: 1;
}
.dam-comment-reactions:hover,
.dam-comment-reactions.is-reaction-picker-open,
.dam-comment-hover-actions > .dam-comment-resolve:hover,
.dam-comment-hover-actions > .dam-comment-menu-wrap:hover {
  border-color: var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
}
.dam-comment-reactions {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 2px;
}
.dam-reaction-button,
.dam-comment-more,
.dam-comment-resolve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 27px;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
}
.dam-reaction-button:hover,
.dam-comment-more:hover,
.dam-comment-resolve:hover {
  background: var(--bs-tertiary-bg, #f2f4f7);
}
.dam-reaction-button span {
  margin-left: 2px;
  font-size: 11px;
}
.dam-reaction-options {
  position: absolute;
  z-index: 1201;
  right: -1px;
  top: calc(100% + 4px);
  transform: none;
  display: none;
  width: 150px;
  min-width: 0;
  flex-direction: row;
  gap: 2px;
}
.dam-reaction-options.is-forced-open {
  transform: none;
  display: grid;
  grid-template-columns: repeat(4, 34px);
  max-width: min(150px, 70vw);
  padding: 3px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 8px;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
}
.dam-reaction-options.is-forced-open.is-fixed {
  position: fixed;
  z-index: 10001;
  right: auto;
  bottom: auto;
}
.dam-comment-reactions.opens-up .dam-reaction-options.is-forced-open {
  top: auto;
  bottom: calc(100% + 4px);
}
.dam-reaction-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 34px;
  height: 30px;
  justify-content: center;
  padding: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  text-align: center;
}
.dam-reaction-detail:hover {
  background: var(--bs-tertiary-bg, #f2f4f7);
}
.dam-comment-reaction-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}
.dam-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid #7aa2ef;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: 14px;
}
.dam-reaction-chip span {
  color: var(--bs-primary, #0d6efd);
  font-size: 13px;
}
.dam-reaction-chip:hover {
  background: rgba(13, 110, 253, .08);
}
.dam-reaction-empty {
  padding: 5px 7px;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 12px;
}
.dam-reaction-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  margin-left: 2px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--bs-primary, #0d6efd);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}
.dam-reaction-add {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 17px;
}
.dam-comment-menu-wrap {
  position: relative;
}
.dam-comment-menu {
  position: absolute;
  z-index: 10001;
  right: 0;
  bottom: calc(100% + 5px);
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 12px;
  background: var(--bs-body-bg, #fff);
  box-shadow: var(--shadow, 0 6px 20px rgba(0,0,0,.16));
}
.dam-comment-menu.is-fixed {
  position: fixed;
  right: auto;
  bottom: auto;
}
.dam-comment-menu-item {
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bs-body-color, #374151);
  font-size: .875rem;
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
}
.dam-comment-menu-item:hover {
  background: var(--bs-tertiary-bg, #f2f4f7);
}
.dam-comment-menu-item.is-danger {
  color: var(--bs-danger, #dc3545);
}
.dam-comment.is-resolved:has(.dam-inline-reply:not(.d-none)) {
  opacity: 1;
}
.dam-pinned-comments {
  padding: 8px;
  border: 1px solid rgba(227, 185, 29, .45);
  border-radius: 8px;
  background: rgba(248, 220, 103, .12);
}
.dam-pinned-comment {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  overflow: hidden;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.dam-pinned-comment-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.dam-pinned-comment .dam-comment-avatar {
  flex: 0 0 30px;
}
.dam-pinned-comment-unpin {
  margin-left: auto;
  flex: 0 0 auto;
}
.dam-annotation-composer {
  position: absolute;
  z-index: 4;
  width: min(260px, 42%);
  padding: 8px;
  border: 1px solid var(--bs-primary, #0d6efd);
  border-radius: 8px;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transform: translate(8px, 8px);
}
.dam-annotation-composer .dam-mention-menu {
  bottom: auto;
  top: 100%;
}
.dam-pinned-comment:hover {
  background: rgba(227, 185, 29, .18);
}
.dam-comment-reply-form {
  position: relative;
  margin: 4px 0 0 30px;
}
.dam-comment-reply-form:has(> .dam-comment) {
  margin-top: 4px;
  padding-left: 0;
  border-left: 0;
}
.dam-comment-reply-form > .dam-comment {
  margin-left: 0;
}
.dam-comment-collapse {
  display: block;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: right;
  opacity: .62;
  font-size: .8rem;
  color: var(--bs-secondary-color, #6c757d) !important;
}
.dam-inline-reply {
  position: relative;
  margin: 8px 0 0 40px;
}
.modal-comments-panel [data-dam-comment-view-form] {
  position: relative;
}
.dam-inline-reply input {
  width: 100%;
}
.dam-inline-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}
.dam-comment-annotation-label {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-primary, #0d6efd);
  font-size: inherit;
}
.dam-comment-text {
  font-size: .875rem !important;
  line-height: 1.45;
  font-weight: 400;
}
.dam-comment-edit-input {
  width: 100%;
  resize: vertical;
}
.dam-comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}
.dam-mention-menu {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 100%;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 8px;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.dam-comment-add {
  height: 38px;
  min-height: 38px;
}
.dam-comment-composer .form-control-sm {
  height: 38px;
}
.dam-mention-option {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.dam-mention-option:hover {
  background: var(--bs-tertiary-bg, #f2f4f7);
}
.dam-mention-option.is-active {
  background: var(--bs-tertiary-bg, #f2f4f7);
  outline: 1px solid var(--bs-primary, #0d6efd);
}
.dam-mention-option span {
  color: var(--bs-secondary-color, #6c757d);
}
.dam-comment-mention {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-primary, #0d6efd);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.dam-comment-mention:hover,
.dam-comment-mention:focus-visible {
  text-decoration: underline;
}
.dam-comment-text a {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.dam-mention-profile-popover {
  position: fixed;
  z-index: 110000;
  width: min(280px, calc(100vw - 16px));
  padding: 12px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 8px;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-size: .875rem;
  line-height: 1.45;
}
.dam-mention-profile-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dam-mention-profile-heading strong {
  font-size: .875rem;
  font-weight: 600;
}
.dam-mention-profile-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}
.dam-mention-profile-details a { color: var(--bs-primary, #0d6efd); }
@media (max-width: 768px) {
  .modal-comments {
    flex-direction: column;
  }
  .modal-comments-preview {
    flex: 0 0 48%;
    min-height: 240px;
  }
  .modal-comments-panel {
    flex: 1 1 auto;
    min-width: 0;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 0;
  }
}
html[data-theme="dark"] .modal-comments-panel,
html[data-theme="dark"] .modal-comments-header {
  background: var(--dark-grey-2);
  color: var(--light-grey-1);
}
html[data-theme="dark"] .modal-comments-preview {
  background: var(--dark-black);
}
html[data-theme="dark"] .dam-mention-menu {
  background: var(--dark-grey-2);
  border-color: #495057;
}
html[data-theme="dark"] .dam-mention-profile-popover {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}
html[data-theme="dark"] .dam-mention-profile-details {
  border-top-color: var(--border);
}
html[data-theme="dark"] .dam-comment-menu {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}
html[data-theme="dark"] .dam-comment-menu-item {
  color: var(--light-grey-1) !important;
}
html[data-theme="dark"] .dam-comment-menu-item.is-danger {
  color: #f87171 !important;
}
html[data-theme="dark"] .modal-comments-panel,
html[data-theme="dark"] .modal-comments-header,
html[data-theme="dark"] .modal-comments-filter-row,
html[data-theme="dark"] .dam-comment-composer {
  background: var(--dark-grey-2);
  border-color: var(--border) !important;
  color: var(--light-grey-1);
}
html[data-theme="dark"] .dam-comments-list {
  background: var(--dark-grey-2);
}
html[data-theme="dark"] .modal-comments-filter-row .form-control,
html[data-theme="dark"] .modal-comments-filter-row .form-select,
html[data-theme="dark"] .comment-notifications-filter {
  background-color: var(--dark-grey-1);
  border-color: var(--border);
  color: var(--light-grey-1);
}
html[data-theme="dark"] .modal-comments-filter-row .form-control::placeholder {
  color: var(--light-grey-3);
}
html[data-theme="dark"] .comment-notifications-dropdown,
html[data-theme="dark"] .comment-notifications-header,
html[data-theme="dark"] .comment-notifications-toolbar,
html[data-theme="dark"] .comment-notifications-list {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
}
html[data-theme="dark"] .comment-notifications-view-tabs .btn-link,
html[data-theme="dark"] .comment-notifications-toolbar .btn-link {
  color: var(--light-grey-2);
}
html[data-theme="dark"] .comment-notifications-view-tabs .btn-link.active {
  color: var(--light-grey-1);
}
html[data-theme="dark"] .comment-notification-item {
  border-bottom-color: var(--border);
}
html[data-theme="dark"] .comment-notification-item.is-unread {
  background: rgba(59, 130, 246, .14);
}
html[data-theme="dark"] .dam-comment-hover-actions {
  opacity: 1;
}
html[data-theme="dark"] .dam-comment-hover-actions,
html[data-theme="dark"] .dam-comment-reaction-summary,
html[data-theme="dark"] .dam-comment-bookmark-button,
html[data-theme="dark"] .dam-reaction-button,
html[data-theme="dark"] .dam-comment-more,
html[data-theme="dark"] .dam-comment-resolve {
  color: var(--light-grey-2) !important;
}
html[data-theme="dark"] .dam-comment-hover-actions:hover,
html[data-theme="dark"] .dam-comment-reactions:hover,
html[data-theme="dark"] .dam-comment-reactions.is-reaction-picker-open,
html[data-theme="dark"] .dam-comment-hover-actions > .dam-comment-resolve:hover,
html[data-theme="dark"] .dam-comment-hover-actions > .dam-comment-menu-wrap:hover {
  background: var(--dark-grey-2);
}
html[data-theme="dark"] .dam-comment-reactions:hover,
html[data-theme="dark"] .dam-comment-reactions.is-reaction-picker-open,
html[data-theme="dark"] .dam-comment-hover-actions > .dam-comment-resolve:hover,
html[data-theme="dark"] .dam-comment-hover-actions > .dam-comment-menu-wrap:hover {
  border-color: var(--border);
}
html[data-theme="dark"] .dam-comment-menu-item:hover,
html[data-theme="dark"] .dam-reaction-button:hover,
html[data-theme="dark"] .dam-comment-more:hover,
html[data-theme="dark"] .dam-comment-resolve:hover {
  background: var(--dark-grey-3);
  color: var(--light-grey-1) !important;
}
html[data-theme="dark"] .dam-comment-bookmark-button:hover,
html[data-theme="dark"] .dam-comment-bookmark-button:focus-visible {
  background: var(--dark-grey-3);
  color: var(--light-grey-1) !important;
}
html[data-theme="dark"] .dam-reaction-options,
html[data-theme="dark"] .dam-annotation-composer {
  background: var(--dark-grey-2);
  border-color: var(--border);
  color: var(--light-grey-1);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .dam-reaction-detail:hover,
html[data-theme="dark"] .dam-mention-option:hover,
html[data-theme="dark"] .dam-mention-option.is-active {
  background: var(--dark-grey-3);
}
html[data-theme="dark"] .dam-comment.is-pinned {
  background: rgba(248, 220, 103, .08);
}
html[data-theme="dark"] .dam-mention-option:hover {
  background: var(--dark-grey-3);
}
.duplicate-comparison-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.duplicate-comparison-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  background: #fff;
}
.duplicate-comparison-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f3f5;
}
.duplicate-comparison-card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.duplicate-review-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 14px;
}
.duplicate-review-dialog {
  width: min(1400px, 96vw);
  max-width: none;
  height: min(92vh, 920px);
}
.duplicate-review-modal-content {
  height: 100%;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}
.duplicate-review-modal-content .modal-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.duplicate-review-compare .version-compare-image-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.duplicate-review-compare .version-compare-pane {
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr) 112px;
  min-height: 0;
}
.duplicate-review-compare .version-compare-header {
  height: 40px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.duplicate-review-compare .version-compare-image-wrap {
  height: auto;
}
.duplicate-review-compare .version-compare-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.duplicate-review-compare [data-duplicate-incoming-info],
.duplicate-review-compare [data-duplicate-existing-info] {
  overflow: hidden;
}
@media (max-width: 700px) {
  .duplicate-review-compare { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dam-rights-grid { grid-template-columns: 1fr; }
  .dam-rights-grid label:last-child { grid-column: auto; }
}
.upload-row--skipping {
  opacity: 0.58;
}

.upload-row--skipping .thumb {
  filter: grayscale(0.7);
}

.duplicate-review-current-choice {
  display: inline-block;
  margin-top: 4px;
  font-weight: 600;
}

.duplicate-review-modal-content .modal-footer {
  position: relative;
}

.duplicate-review-modal-content .duplicate-review-navigation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.upload-progress-review-state {
  cursor: pointer;
  display: inline-block;
  border-radius: 6px;
  padding: 2px 4px;
}

.upload-progress-review-state:hover,
.upload-progress-review-state:focus-visible {
  background: rgba(59, 130, 246, 0.08);
  outline: none;
}

/* Keep the image stage consistent across the desktop modal views. */
@media (min-width: 992px) {
  .modal-comments-panel,
  .modal-versions-panel,
  .modal-variations-panel { flex: 0 0 360px; min-width: 360px; max-width: 360px; }
  .modal-comments-preview,
  .modal-versions-preview,
  .modal-variations-preview { flex: 1 1 0; min-width: 0; padding: 1.5rem; }
  .modal-comments-image-wrap img,
  .modal-versions-preview img,
  .modal-variations-preview img { max-width: 100%; max-height: calc(92vh - 220px); object-fit: contain; }
}

/* Full-height image viewer and persistent detail tabs. */
@media (min-width: 992px) {
  #image-modal.image-modal-overlay { padding: 0 !important; }
  #image-modal .image-modal-shell { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
  #image-modal .image-modal-header { flex: 0 0 auto; }
  #image-modal .modal-image-wrap img,
  #image-modal .modal-comments-image-wrap img,
  #image-modal .modal-versions-preview img,
  #image-modal .modal-variations-preview img { max-height: calc(100vh - 150px); }
  #image-modal .modal-sidebar,
  #image-modal .modal-comments-panel,
  #image-modal .modal-variations-panel,
  #image-modal .modal-versions-panel { flex: 0 0 380px; width: 380px; min-width: 380px; max-width: 380px; }
}
#image-modal .modal-panel-tabs { display: flex; flex: 0 0 auto; gap: 3px; padding: 4px; margin: 12px; border-radius: 9px; background: #eef0f3; }
#image-modal .modal-sidebar > .modal-panel-tabs { margin: 0 0 20px; }
#image-modal .modal-panel-tabs button { flex: 1 1 0; min-width: 0; padding: 8px 3px; border: 0; border-radius: 7px; background: transparent; color: #626b79; font-size: 13px; font-weight: 600; }
#image-modal .modal-panel-tabs button.is-active { background: #fff; color: #1f2937; box-shadow: 0 1px 3px #0002; }
#image-modal .modal-panel-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dce2ea; color: #374151; font-size: 10px; }
#image-modal .modal-panel-count[hidden] { display: none; }
#image-modal .modal-variation-tabs { display: flex; gap: 16px; padding: 0 16px 10px; border-bottom: 1px solid #e5e7eb; }
#image-modal .modal-variation-tabs button { padding: 5px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #6b7280; font-size: 13px; }
#image-modal .modal-variation-tabs button.is-active { color: #2563eb; border-bottom-color: #2563eb; }
#image-modal .modal-sidebar > .variation-preview { display: none !important; }
#image-modal .modal-split-nav { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3; }
#image-modal .modal-split-nav .image-counter { background: rgba(0,0,0,.65); }
#image-modal.is-comments-mode .modal-header-actions { display: flex !important; }
#image-modal .modal-panel-toggle { flex-shrink: 0; }
#image-modal.is-crop-mode .modal-panel-toggle { display: none; }
#image-modal.is-panel-collapsed .modal-panel-toggle svg { transform: scaleX(-1); }
#image-modal .modal-panel-tabs button:focus-visible,
#image-modal .modal-variation-tabs button:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
html[data-theme="dark"] #image-modal .modal-panel-tabs { background: #20232d; }
html[data-theme="dark"] #image-modal .modal-panel-tabs button { color: #a8adba; }
html[data-theme="dark"] #image-modal .modal-panel-tabs button.is-active { background: #373c4d; color: #f8fafc; }
html[data-theme="dark"] #image-modal .modal-panel-count { background: #525a6e; color: #fff; }
html[data-theme="dark"] #image-modal .modal-variation-tabs { border-color: #3a3a3a; }
html[data-theme="dark"] #image-modal .modal-variation-tabs button.is-active { color: #a8c5ff; border-color: #a8c5ff; }
#image-modal .modal-variations-list,
#image-modal .modal-versions-list { flex: 1 1 auto; align-self: stretch; min-width: 0; min-height: 0; overflow-y: auto; padding: 12px; gap: 12px; }
#image-modal .variation-row,
#image-modal .version-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 12px; min-width: 0; }
#image-modal .variation-row.is-crop { margin-left: 16px; padding: 12px; gap: 10px; }
#image-modal .variation-thumb,
#image-modal .variation-row.is-crop .variation-thumb,
#image-modal .version-thumb { width: 64px; height: 64px; }
#image-modal .variation-info,
#image-modal .version-info { min-width: 0; overflow-wrap: anywhere; }
#image-modal .variation-actions,
#image-modal .version-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; margin: 0; gap: 6px; }
#image-modal .variation-actions .download-dropdown { width: auto; }
#image-modal .variation-actions .btn,
#image-modal .version-actions .btn { width: auto; }
#image-modal .modal-variations-list,
#image-modal .modal-versions-list { align-content: start; grid-auto-rows: max-content; }
@media (max-width: 991.98px) {
  #image-modal.image-modal-overlay { padding: 0 !important; overflow: hidden; }
  #image-modal .image-modal-shell { width: 100vw; height: 100dvh; min-height: 0; max-height: none; border-radius: 0; }
  #image-modal .image-modal-body { min-height: 0; overflow: hidden; }
  #image-modal .modal-view-main { flex-direction: column; min-height: 0; overflow: hidden; }
  #image-modal .modal-image-area { flex: 1 1 0; min-height: 0; }
  #image-modal .modal-sidebar { flex: 0 1 auto; width: 100%; min-width: 0; max-height: 42%; overflow-y: auto; }
  #image-modal .modal-comments, #image-modal .modal-variations, #image-modal .modal-versions { flex-direction: column; min-height: 0; }
  #image-modal .modal-comments-preview, #image-modal .modal-variations-preview, #image-modal .modal-versions-preview { flex: 1 1 0; min-height: 0; padding: 16px; }
  #image-modal .modal-comments-panel, #image-modal .modal-variations-panel, #image-modal .modal-versions-panel { flex: 0 1 42%; width: 100%; min-width: 0; min-height: 0; max-width: none; overflow-y: auto; }
  #image-modal .modal-image-wrap img, #image-modal .modal-comments-image-wrap img, #image-modal .modal-variations-preview img, #image-modal .modal-versions-preview img { max-height: 100%; }
}
@media (max-width: 991.98px) {
  #image-modal .image-modal-header { min-width: 0; padding: 8px 12px !important; }
  #image-modal .modal-header-left { flex: 1 1 auto; min-width: 0; }
  #image-modal .modal-title-wrap { min-width: 0; overflow: hidden; }
  #image-modal .modal-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #image-modal .modal-header-actions { flex: 0 0 auto; gap: 2px !important; }
  #image-modal [data-modal-main-actions] { gap: 0 !important; }
  #image-modal [data-modal-main-actions] > .btn,
  #image-modal [data-modal-main-actions] > .download-dropdown > .btn { font-size: 0; padding: 6px; gap: 0 !important; }
  #image-modal [data-modal-main-actions] > .btn > span:not(.badge) { display: none; }
  #image-modal [data-modal-variation-add], #image-modal [data-crop-request-dropdown],
  #image-modal [data-modal-version-upload], #image-modal [data-modal-version-compare-toggle] { display: none !important; }
}
/* Compact tabs and adjustable image-details panel. */
@media (min-width: 992px) {
  #image-modal .modal-sidebar,
  #image-modal .modal-comments-panel,
  #image-modal .modal-variations-panel,
  #image-modal .modal-versions-panel { flex: 0 0 var(--modal-panel-width, 380px); width: var(--modal-panel-width, 380px); min-width: 0; max-width: none; }
}
#image-modal .modal-sidebar, #image-modal .modal-comments-panel,
#image-modal .modal-variations-panel, #image-modal .modal-versions-panel { position: relative; }
#image-modal .modal-panel-resize-handle { left: 0; right: auto; z-index: 20; touch-action: none; }
#image-modal .modal-panel-resize-handle:focus-visible::after { background: #3b82f6; }
@media (max-width: 991.98px) { #image-modal .modal-panel-resize-handle { display: none; } }
#image-modal .modal-panel-tabs { padding: 3px; }
#image-modal .modal-panel-tabs button { padding: 5px 3px; line-height: 20px; }
#image-modal .modal-panel-count,
html[data-theme="dark"] #image-modal .modal-panel-count { background: #2563eb; color: #fff; }
#image-modal.is-variations-mode [data-modal-main-actions],
#image-modal.is-versions-mode [data-modal-main-actions] { display: flex !important; }
#image-modal .modal-variation-toolbar { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 12px 12px; border-bottom: 1px solid #e5e7eb; }
#image-modal .modal-variation-toolbar .btn { font-size: 12px; padding: 4px 7px; white-space: nowrap; }
#image-modal .variation-actions > button > span,
#image-modal .variation-actions > .download-dropdown > button > span,
#image-modal .variation-actions > .variation-more > button > span { display: none; }
#image-modal .variation-actions > button,
#image-modal .variation-actions > .download-dropdown > button,
#image-modal .variation-actions > .variation-more > button { width: 30px !important; height: 30px; padding: 0; justify-content: center; }
#image-modal .variation-actions > button svg,
#image-modal .variation-actions > .download-dropdown > button svg,
#image-modal .variation-actions > .variation-more > button svg { margin: 0 !important; }
html[data-theme="dark"] #image-modal .modal-variation-toolbar { border-color: #3a3a3a; }
/* Align the detail panels and keep their controls in the image stage. */
#image-modal .modal-sidebar { padding: 0 !important; }
#image-modal .modal-sidebar > .modal-panel-tabs { margin: 12px; }
#image-modal .modal-sidebar > .sidebar-section { padding: 0 16px; }
#image-modal .modal-sidebar, #image-modal .modal-comments-panel,
#image-modal .modal-variations-panel, #image-modal .modal-versions-panel { background: #fff; border-left: 1px solid #e5e7eb; }
#image-modal .modal-variations-list, #image-modal .modal-versions-list { background: transparent; }
#image-modal .modal-panel-toggle { position: absolute; z-index: 6; top: 12px; right: 8px; background: rgba(255,255,255,.9); }
#image-modal [data-modal-comments-toggle] { display: none !important; }
#image-modal .variation-thumb, #image-modal .variation-thumb-wrap { border-radius: 4px; }
#image-modal .variation-footer { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 8px; min-width: 0; }
#image-modal .variation-footer-status { flex: 0 1 auto; min-width: 0; }
#image-modal .variation-footer .variation-actions { flex: 0 0 auto; justify-content: flex-end; margin-left: auto; }
#image-modal .variation-actions > button,
#image-modal .variation-actions > .download-dropdown > button,
#image-modal .variation-actions > .variation-more > button { width: 26px !important; height: 26px; border-color: transparent; background: transparent; box-shadow: none; color: #64748b; }
#image-modal .variation-actions > button:hover,
#image-modal .variation-actions > .download-dropdown > button:hover,
#image-modal .variation-actions > .variation-more > button:hover { background: #e9edf3; color: #1f2937; }
html[data-theme="dark"] #image-modal .modal-sidebar,
html[data-theme="dark"] #image-modal .modal-comments-panel,
html[data-theme="dark"] #image-modal .modal-variations-panel,
html[data-theme="dark"] #image-modal .modal-versions-panel { background: var(--dark-grey-2); border-color: var(--border); }
html[data-theme="dark"] #image-modal .modal-panel-toggle { background: rgba(43,43,43,.9); }
html[data-theme="dark"] #image-modal .variation-actions > button,
html[data-theme="dark"] #image-modal .variation-actions > .download-dropdown > button,
html[data-theme="dark"] #image-modal .variation-actions > .variation-more > button { color: #cfcfcf; border-color: transparent; background: transparent; }
html[data-theme="dark"] #image-modal .variation-actions > button:hover,
html[data-theme="dark"] #image-modal .variation-actions > .download-dropdown > button:hover,
html[data-theme="dark"] #image-modal .variation-actions > .variation-more > button:hover { background: #3a3a3a; color: #fff; }
/* Modal stage controls, room for navigation, and panel loading states. */
#image-modal .modal-stage-controls { position: absolute; z-index: 6; top: 12px; right: 8px; display: flex; align-items: center; gap: 4px; }
#image-modal .modal-stage-controls .modal-panel-toggle { position: static; background: transparent; }
#image-modal .modal-stage-controls .modal-panel-toggle:hover,
#image-modal .modal-stage-controls .modal-collapsed-indicator:hover { background: rgba(128,128,128,.16); }
#image-modal .modal-collapsed-indicator { display: none; position: relative; background: transparent; }
#image-modal.is-panel-collapsed .modal-collapsed-indicator:not([hidden]) { display: inline-flex; }
#image-modal .modal-collapsed-indicator[hidden], #image-modal .modal-collapsed-badge[hidden] { display: none !important; }
#image-modal .modal-collapsed-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
#image-modal .modal-image-area, #image-modal .modal-comments-preview,
#image-modal .modal-variations-preview, #image-modal .modal-versions-preview { padding-bottom: 68px !important; }
#image-modal .modal-panel-loader { position: absolute; z-index: 12; inset: 60px 0 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.96); }
#image-modal .modal-panel-loader[hidden] { display: none; }
html[data-theme="dark"] #image-modal .modal-panel-loader { background: rgba(36,36,36,.96); }
html[data-theme="dark"] #image-modal .modal-stage-controls .modal-panel-toggle { background: transparent; }
/* A persistent count, offset from the existing variation and bookmark badges. */
.image-card .badge.card-comments { top: 8px; right: 8px; background: rgba(0,0,0,.35); pointer-events: none; font-weight: 400; }
.image-card.has-comments .badge.variations { right: 44px; }
.image-card.has-comments .badge.favorites { right: 44px; }
.image-card.has-comments.has-variations .badge.favorites { right: 84px; }
.image-card.has-comments.has-many-variations .badge.favorites { right: 92px; }

/* Slide the details panel while the image stage takes up the freed space. */
#image-modal .modal-sidebar, #image-modal .modal-comments-panel,
#image-modal .modal-variations-panel, #image-modal .modal-versions-panel {
  transition: flex-basis 320ms ease, width 320ms ease, max-height 320ms ease, opacity 240ms ease, border-width 320ms ease;
}
body.is-resizing #image-modal .modal-sidebar, body.is-resizing #image-modal .modal-comments-panel,
body.is-resizing #image-modal .modal-variations-panel, body.is-resizing #image-modal .modal-versions-panel { transition: none; }
#image-modal.is-panel-collapsed .modal-sidebar, #image-modal.is-panel-collapsed .modal-comments-panel,
#image-modal.is-panel-collapsed .modal-variations-panel, #image-modal.is-panel-collapsed .modal-versions-panel {
  flex-basis: 0; min-width: 0; min-height: 0; overflow: hidden; opacity: 0; border-width: 0; pointer-events: none;
}
@media (min-width: 992px) {
  #image-modal.is-panel-collapsed .modal-sidebar, #image-modal.is-panel-collapsed .modal-comments-panel,
  #image-modal.is-panel-collapsed .modal-variations-panel, #image-modal.is-panel-collapsed .modal-versions-panel { width: 0; }
}
@media (max-width: 991.98px) {
  #image-modal .modal-sidebar { flex-basis: 42%; }
  #image-modal.is-panel-collapsed .modal-sidebar, #image-modal.is-panel-collapsed .modal-comments-panel,
  #image-modal.is-panel-collapsed .modal-variations-panel, #image-modal.is-panel-collapsed .modal-versions-panel { max-height: 0; }
}

/* Shared details-panel theme and responsive icon-and-label tabs. */
#image-modal .modal-panel-tabs { overflow: hidden; }
#image-modal .modal-panel-tabs button { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 auto; gap: 4px; white-space: nowrap; padding-left: 7px; padding-right: 7px; }
#image-modal .modal-panel-tabs button svg { flex: 0 0 14px; }
#image-modal .modal-panel-tabs .modal-panel-count { flex: 0 0 auto; }
#image-modal .modal-panel-tabs.is-compact button:not(.is-active) .modal-tab-label { display: none; }
html[data-theme="dark"] #image-modal .modal-details-panel,
html[data-theme="dark"] #image-modal .modal-details-panel.bg-white,
html[data-theme="dark"] #image-modal .modal-comments-header,
html[data-theme="dark"] #image-modal .modal-comments-filter-row,
html[data-theme="dark"] #image-modal .dam-comments-list,
html[data-theme="dark"] #image-modal .dam-comment-composer,
html[data-theme="dark"] #image-modal .modal-panel-loader { background: var(--dark-black) !important; color: var(--light-grey-1); }
/* Group thumbnail badges so their spacing is independent of count width. */
.image-card .card-top-badges { position: absolute; top: 8px; right: 8px; z-index: 4; display: flex; align-items: center; gap: 4px; }
.image-card .card-top-badges .badge { position: static; }
.image-card .card-top-badges .card-comments { pointer-events: auto; cursor: pointer; border: 0; }

/* File history is a separate view of the current asset. */
#image-modal .file-history-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:16px 16px 8px; flex-wrap:wrap; }
#image-modal .file-history-heading strong { font-size:14px; }
#image-modal .file-history-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
#image-modal .file-history-filter { position:relative; }
#image-modal .file-history-filter summary { list-style:none; display:flex; align-items:center; gap:5px; }
#image-modal .file-history-filter summary::-webkit-details-marker { display:none; }
#image-modal .file-history-filter-menu { position:absolute; right:0; top:calc(100% + 4px); width:190px; z-index:25; padding:8px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; box-shadow:0 8px 20px #0002; }
#image-modal .file-history-filter-menu label { display:flex; align-items:center; gap:8px; padding:5px; font-size:13px; }
#image-modal .file-history-upload { padding:0 12px 6px; }
#image-modal .file-history-error { padding:0 16px 8px; }
#image-modal .modal-versions-list { display:block; overflow:auto; padding:10px 16px 20px 25px; }
#image-modal .file-history-event { position:relative; border-left:1px solid #d0d5dc; padding:0 0 20px 20px; font-size:13px; }
#image-modal .file-history-event:last-child { padding-bottom:0; }
#image-modal .file-history-dot { position:absolute; top:4px; left:-6px; width:11px; height:11px; border:2px solid #89919d; border-radius:50%; background:#fff; }
#image-modal .file-history-version .file-history-dot { border-color:#3564e8; background:#3564e8; }
#image-modal .file-history-date { font-size:11px; color:#727b88; margin-bottom:4px; }
#image-modal .file-history-detail { color:#727b88; margin-top:4px; overflow-wrap:anywhere; }
#image-modal .file-history-event .version-row { display:flex; align-items:center; gap:10px; margin-top:9px; padding:8px; border:1px solid #e1e5eb; border-radius:8px; background:#f6f7f9; }
#image-modal .file-history-event .version-thumb { width:48px; height:48px; border-radius:4px; object-fit:cover; }
#image-modal .file-history-event .version-info { flex:1; }
#image-modal .file-history-event .version-title, #image-modal .file-history-event .version-meta { margin:0; }
#image-modal .file-history-event .version-actions { display:flex; flex:0 0 auto; margin:0; }
#image-modal .file-history-event .version-actions button { width:28px; height:28px; padding:4px; }
html[data-theme="dark"] #image-modal .file-history-filter-menu { background:var(--dark-grey-2); border-color:var(--border); }
html[data-theme="dark"] #image-modal .file-history-event { border-color:var(--border); }
html[data-theme="dark"] #image-modal .file-history-dot { background:var(--dark-black); }
html[data-theme="dark"] #image-modal .file-history-version .file-history-dot { background:#6386ff; border-color:#6386ff; }
html[data-theme="dark"] #image-modal .file-history-event .version-row { background:var(--dark-grey-2); border-color:var(--border); }
#image-modal.is-panel-collapsed.is-versions-mode .modal-versions-panel { flex:0 0 var(--modal-panel-width, 380px); width:var(--modal-panel-width, 380px); opacity:1; pointer-events:auto; border-left-width:1px; overflow:visible; }
@media (max-width:991.98px) {
 #image-modal.is-panel-collapsed.is-versions-mode .modal-versions-panel { flex:0 1 42%; width:100%; max-height:42%; overflow:auto; }
 #image-modal.is-versions-mode .file-history-tools [data-modal-version-compare-toggle], #image-modal.is-versions-mode .file-history-upload [data-modal-version-upload] { display:inline-flex !important; }
}

#image-modal .version-preview-select { padding:0; border:0; background:transparent; flex:0 0 auto; }

/* File history has its own width and dedicated header action. */
#image-modal .file-history-header-upload { display:none !important; }
#image-modal.is-versions-mode .file-history-header-upload { display:inline-flex !important; align-items:center; gap:8px; }
#image-modal.is-versions-mode [data-modal-main-actions] { display:none !important; }
@media (min-width:992px) {
 #image-modal.is-versions-mode .modal-versions-panel,
 #image-modal.is-panel-collapsed.is-versions-mode .modal-versions-panel { flex:0 0 var(--file-history-panel-width, 380px); width:var(--file-history-panel-width, 380px); }
}

/* File history sits above the still-visible image viewer. */
#image-modal.is-versions-mode [data-modal-main-actions] { display:flex !important; }
#image-modal .modal-view-versions.is-active { position:fixed; inset:0; z-index:110; display:flex; align-items:center; justify-content:center; padding:3vh 3vw; }
#image-modal .file-history-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.58); }
#image-modal .file-history-dialog { position:relative; display:flex; flex-direction:column; width:min(1440px, 94vw); height:90vh; min-height:0; max-width:100%; overflow:hidden; border-radius:12px; background:#fff; box-shadow:0 22px 70px rgba(0,0,0,.35); }
#image-modal .file-history-dialog-header { flex:0 0 auto; display:flex; align-items:center; gap:10px; min-height:60px; padding:10px 16px; border-bottom:1px solid #e5e7eb; background:#fff; }
#image-modal .file-history-dialog-title { flex:1; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#image-modal .file-history-dialog .modal-versions-preview { min-width:0; min-height:0; padding:24px !important; }
#image-modal .file-history-dialog .version-preview-wrap { width:100%; height:100%; min-height:0; }
#image-modal .file-history-dialog .version-preview-wrap img { max-width:100%; max-height:100%; }
html[data-theme="dark"] #image-modal .file-history-dialog,
html[data-theme="dark"] #image-modal .file-history-dialog-header { background:var(--dark-black); color:var(--light-grey-1); border-color:var(--border); }
@media (max-width:991.98px) {
 #image-modal .modal-view-versions.is-active { padding:2vh 2vw; }
 #image-modal .file-history-dialog { width:96vw; height:96dvh; }
 #image-modal .file-history-dialog-header { min-height:52px; padding:8px; }
 #image-modal .file-history-dialog-title { font-size:14px; }
 #image-modal .file-history-header-upload span { display:none; }
}

#image-modal .file-history-backdrop { backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
#image-modal .modal-version-pill { cursor:default; }

.sidebar-collection-row { position: relative; }
.sidebar-collection-row > .section-toggle,
.sidebar-collection-row > .sub-toggle { padding-right: 42px; }
.sidebar-create-collection {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: inherit; opacity: 0; pointer-events: none;
}
.sidebar-collection-row:hover .sidebar-create-collection,
.sidebar-collection-row:focus-within .sidebar-create-collection { opacity: 1; pointer-events: auto; }
.sidebar-create-collection:hover, .sidebar-create-collection:focus-visible { background: rgba(128, 128, 128, .2); }
@media (hover: none) { .sidebar-create-collection { opacity: 1; pointer-events: auto; } }

.sidebar-collection-row:hover > .section-toggle,
.sidebar-collection-row:hover > .sub-toggle { background: #f9fafb; }
html[data-theme="dark"] .sidebar-collection-row:hover > .section-toggle,
html[data-theme="dark"] .sidebar-collection-row:hover > .sub-toggle { background: var(--dark-grey-3); }
html[data-theme="dark"] .sidebar-create-collection:hover,
html[data-theme="dark"] .sidebar-create-collection:focus-visible { background: var(--dark-grey-5); }
