.nx-select-control {
  position: relative;
  width: 100%;
  min-width: 0;
}

.nx-select-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nx-select-trigger {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-bg);
  color: var(--nx-text);
  text-align: left;
  cursor: pointer;
}

.nx-select-trigger:hover {
  border-color: color-mix(in srgb, var(--nx-border) 45%, var(--nx-text-muted));
}

.nx-select-trigger:focus-visible {
  box-shadow: var(--nx-focus);
}

.nx-select-trigger[aria-expanded="true"] {
  border-color: var(--nx-border);
  background: var(--nx-surface-subtle);
}

.nx-select-trigger:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.nx-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-select-chevron {
  display: grid;
  place-items: center;
  color: var(--nx-text-muted);
  transition: transform .14s ease;
}

.nx-select-control.is-open .nx-select-chevron {
  transform: rotate(180deg);
}

.nx-select-popover {
  position: fixed;
  top: auto;
  left: auto;
  z-index: 80;
  width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(288px, calc(100vh - 32px));
  padding: 6px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
  overflow: auto;
}

.nx-select-popover[hidden] {
  display: none;
}

.nx-select-listbox {
  display: grid;
  gap: 2px;
  outline: none;
}

.nx-select-option {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  border-radius: var(--nx-radius-md);
  color: var(--nx-text);
  cursor: pointer;
  user-select: none;
}

.nx-select-option:hover,
.nx-select-option:focus-visible {
  background: var(--nx-hover);
}

.nx-select-option:focus-visible {
  box-shadow: inset var(--nx-focus);
  outline: none;
}

.nx-select-option.is-selected {
  background: var(--nx-primary-soft);
}

.nx-select-option.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}

.nx-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-select-option-check {
  display: grid;
  place-items: center;
  color: var(--nx-primary);
}

.nx-select-option-check[hidden] {
  visibility: hidden;
}

@media (max-width: 640px) {
  .nx-select-popover {
    width: 100%;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-select-chevron {
    transition-duration: .001ms;
  }
}


.nx-dialog {
  padding: 0;
  overflow: hidden;
  outline: none;
}

.nx-dialog[data-nx-dialog-transitioning="true"] {
  transition:
    width .18s cubic-bezier(.2, .8, .2, 1),
    height .18s cubic-bezier(.2, .8, .2, 1);
}

.nx-dialog[data-nx-dialog-transitioning="true"] > * {
  animation: nx-dialog-content-enter .14s ease both;
}

@keyframes nx-dialog-content-enter {
  from {
    opacity: .72;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-dialog[data-nx-dialog-transitioning="true"] {
    transition-duration: .001ms;
  }

  .nx-dialog[data-nx-dialog-transitioning="true"] > * {
    animation-duration: .001ms;
  }
}

.nx-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nx-space-4);
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--nx-divider);
}

.nx-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -.02em;
}

.nx-dialog-description {
  margin: 4px 0 0;
  color: var(--nx-text-muted);
  font-size: 13px;
  line-height: 18px;
}

.nx-dialog-body {
  padding: 20px 24px;
  overflow: auto;
}

.nx-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--nx-space-2);
  padding: 14px 24px;
  border-top: 1px solid var(--nx-divider);
  background: var(--nx-surface);
}

.nx-form-dialog {
  width: min(680px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 32px));
  max-height: none;
  overflow: visible;
}

.nx-form-dialog[data-nx-dialog-variant="compact"] {
  width: min(620px, calc(100vw - 32px));
  height: auto;
  max-height: min(500px, calc(100dvh - 32px));
}

.nx-form-dialog[data-nx-dialog-variant="wide"] {
  width: min(860px, calc(100vw - 32px));
  height: min(660px, calc(100dvh - 32px));
  max-height: none;
}

.nx-form-dialog[data-nx-dialog-variant="compact"] .nx-form-dialog-form {
  height: auto;
  max-height: min(500px, calc(100dvh - 32px));
}

.nx-form-dialog-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: inherit;
}

.nx-detail-dialog {
  width: min(980px, calc(100vw - 32px));
  height: auto;
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
}

.nx-detail-dialog-frame {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  height: auto;
  max-height: inherit;
  overflow: hidden;
  border-radius: inherit;
}

.nx-detail-dialog .nx-dialog-body {
  max-height: min(560px, calc(100dvh - 210px));
}

.nx-detail-dialog-heading {
  min-width: 0;
}

.nx-detail-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--nx-space-2);
  flex-wrap: wrap;
}


.nx-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nx-space-4);
}

.nx-form-grid > .nx-form-field--full {
  grid-column: 1 / -1;
}

.nx-form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nx-form-field .nx-input,
.nx-form-field .nx-textarea,
.nx-form-field .nx-select-control,
.nx-form-field > .nx-select {
  width: 100%;
}

.nx-field-help,
.nx-field-error {
  font-size: 12px;
  line-height: 16px;
}

.nx-field-help {
  color: var(--nx-text-muted);
}

.nx-field-error {
  color: var(--nx-danger);
}

.nx-form-field.is-invalid .nx-input,
.nx-form-field.is-invalid .nx-textarea,
.nx-form-field.is-invalid .nx-select-trigger {
  border-color: color-mix(in srgb, var(--nx-danger) 72%, var(--nx-border));
}

.nx-form-field.is-invalid .nx-input:focus-visible,
.nx-form-field.is-invalid .nx-textarea:focus-visible,
.nx-form-field.is-invalid .nx-select-trigger:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-danger) 20%, transparent);
}

.nx-form-validation-summary {
  margin-bottom: var(--nx-space-4);
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--nx-danger) 30%, var(--nx-border));
  border-radius: var(--nx-radius-md);
  background: var(--nx-danger-bg);
  color: var(--nx-danger);
  font-size: 13px;
  line-height: 18px;
}

.nx-form-validation-summary[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .nx-form-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
  }

  .nx-form-dialog[data-nx-dialog-variant="wide"] {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
  }


  .nx-form-dialog--compact {
    width: calc(100vw - 16px);
    height: auto;
    max-height: calc(100dvh - 16px);
  }

  .nx-form-dialog--compact .nx-form-dialog-form {
    height: auto;
    max-height: calc(100dvh - 16px);
  }

  .nx-detail-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
  }

  .nx-form-dialog-form {
    height: 100%;
    max-height: none;
  }

  .nx-dialog-header,
  .nx-dialog-body,
  .nx-dialog-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nx-form-grid {
    grid-template-columns: 1fr;
  }

  .nx-dialog-footer .nx-button {
    flex: 1 1 0;
  }
}


.nx-responsive-table {
  width: 100%;
  min-width: 0;
}

.nx-table-sort {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.nx-table-sort:hover {
  color: var(--nx-text);
}

.nx-table-sort:focus-visible {
  outline: 2px solid var(--nx-focus);
  outline-offset: 2px;
}

.nx-table-sort[data-nx-sort-state="ascending"],
.nx-table-sort[data-nx-sort-state="descending"] {
  color: var(--nx-primary);
}

.nx-table-sort > span {
  min-width: 0;
}

.nx-table-sort > .nx-icon {
  flex: 0 0 auto;
}

.nx-responsive-table .nx-table-wrap {
  width: 100%;
}

@media (max-width: 767px) {
  .nx-responsive-table .nx-table-wrap {
    overflow: visible;
  }

  .nx-responsive-table .nx-table {
    min-width: 0;
  }

  .nx-responsive-table .nx-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nx-responsive-table .nx-table,
  .nx-responsive-table .nx-table tbody,
  .nx-responsive-table .nx-table tr,
  .nx-responsive-table .nx-table td {
    display: block;
    width: 100%;
  }

  .nx-responsive-table .nx-table tbody {
    display: grid;
    gap: var(--nx-space-2);
  }

  .nx-responsive-table .nx-table tbody tr {
    padding: 12px;
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-lg);
    background: var(--nx-surface);
  }

  .nx-responsive-table .nx-table tbody tr:hover {
    background: var(--nx-surface);
  }

  .nx-responsive-table .nx-table td {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(96px, .45fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 6px 0;
    border: 0;
  }

  .nx-responsive-table .nx-table td::before {
    content: attr(data-nx-label);
    min-width: 0;
    color: var(--nx-text-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
  }

  .nx-responsive-table .nx-table td[data-nx-primary-cell] {
    display: block;
    padding: 0 0 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--nx-divider);
  }

  .nx-responsive-table .nx-table td[data-nx-primary-cell]::before {
    content: none;
  }
}


.nx-search-control {
  position: relative;
  display: block;
  min-width: 0;
}

.nx-search-control > .nx-icon {
  position: absolute;
  z-index: 1;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nx-text-muted);
  pointer-events: none;
}

.nx-search-control > .nx-search-field {
  padding-left: 36px;
}

.nx-filter-bar {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--nx-space-3);
}

.nx-filter-controls {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: var(--nx-space-2);
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.nx-filter-controls > .nx-search-control {
  flex: 1 1 280px;
  min-width: 220px;
}

.nx-filter-controls > .nx-select,
.nx-filter-controls > .nx-select-control {
  width: auto;
  min-width: 160px;
  flex: 0 1 190px;
}

@media (min-width: 1024px) {
  .nx-filter-controls {
    flex-wrap: nowrap;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nx-filter-controls > .nx-search-control,
  .nx-filter-controls > .nx-select,
  .nx-filter-controls > .nx-select-control {
    flex: 1 1 calc(50% - var(--nx-space-2));
  }
}

.nx-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--nx-space-2);
  flex: 0 0 auto;
}

.nx-tabs {
  display: grid;
  gap: var(--nx-space-4);
}

.nx-tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border-bottom: 1px solid var(--nx-divider);
}

.nx-tab-list > .nx-tab {
  position: relative;
  flex: 0 0 auto;
  border-radius: var(--nx-radius-md) var(--nx-radius-md) 0 0;
}

.nx-tab-list > .nx-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--nx-primary);
}

.nx-tab-list > .nx-tab:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.nx-tab-panel {
  min-width: 0;
}

.nx-tab-panel[hidden] {
  display: none;
}

.nx-state,
.nx-empty,
.nx-error-state,
.nx-loading-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--nx-space-2);
  padding: var(--nx-space-6);
  text-align: center;
  color: var(--nx-text-muted);
}

.nx-state[data-nx-state-density="compact"] {
  min-height: 112px;
  padding: var(--nx-space-4) var(--nx-space-6);
}

.nx-state-title {
  margin: 0;
  color: var(--nx-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.nx-state-message {
  max-width: 560px;
  margin: 0;
  font-size: 13px;
  line-height: 19px;
}

.nx-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nx-space-2);
  margin-top: var(--nx-space-2);
}

.nx-error-state .nx-state-title {
  color: var(--nx-danger);
}

.nx-loading-state[aria-busy="true"] {
  cursor: progress;
}

.nx-media-load {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  background: var(--nx-surface-subtle);
}

.nx-media-load-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.nx-media-load-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nx-media-load[data-nx-media-enhanced="true"] .nx-media-load-image {
  opacity: 0;
  transition: opacity .18s ease;
}

.nx-media-load[data-nx-media-enhanced="true"] .nx-media-load-fallback {
  opacity: 0;
}

.nx-media-load.is-loaded .nx-media-load-image {
  opacity: 1;
}

.nx-media-load.is-error .nx-media-load-fallback {
  opacity: 1;
}

.nx-media-load.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      110deg,
      transparent 18%,
      color-mix(in srgb, var(--nx-surface) 74%, transparent) 42%,
      transparent 66%
    );
  transform: translateX(-100%);
  animation: nx-media-load-shimmer 1.15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nx-media-load-shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-media-load[data-nx-media-enhanced="true"] .nx-media-load-image {
    transition-duration: .001ms;
  }

  .nx-media-load.is-loading::after {
    animation: none;
    transform: none;
    background: color-mix(in srgb, var(--nx-surface) 45%, transparent);
  }
}

@media (max-width: 767px) {
  .nx-filter-bar,
  .nx-filter-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .nx-filter-actions {
    justify-content: stretch;
  }

  .nx-filter-actions > .nx-button {
    flex: 1 1 0;
  }

  .nx-tab-list {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
}



.nx-button--secondary {
  border: 1px solid var(--nx-border);
  background: var(--nx-surface);
  color: var(--nx-text);
}

.nx-button--secondary:hover {
  background: var(--nx-hover);
}

.nx-button:disabled,
.nx-icon-button:disabled,
.nx-button[aria-disabled="true"],
.nx-icon-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .48;
  pointer-events: none;
}

.nx-button[aria-busy="true"] {
  cursor: progress;
}

.nx-status-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nx-space-2);
}

.nx-status--info {
  background: color-mix(in srgb, var(--nx-info) 12%, transparent);
  color: var(--nx-info);
}


.nx-entity-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.nx-entity-identity .nx-avatar {
  flex: 0 0 auto;
  overflow: hidden;
}

.nx-entity-avatar-image-wrap {
  background: var(--nx-surface-subtle);
}

.nx-entity-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nx-entity-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.nx-entity-primary,
.nx-entity-secondary,
.nx-entity-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-entity-primary {
  color: var(--nx-text);
  font-weight: 650;
}

.nx-entity-secondary,
.nx-entity-meta {
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}

.nx-entity-status {
  margin-left: auto;
  flex: 0 0 auto;
}

.nx-breadcrumbs {
  min-width: 0;
  color: var(--nx-text-muted);
  font-size: 13px;
  line-height: 18px;
}

.nx-breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nx-breadcrumbs li {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nx-breadcrumbs li + li::before {
  content: "›";
  color: var(--nx-text-muted);
}

.nx-breadcrumbs a,
.nx-breadcrumbs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-breadcrumbs [aria-current="page"] {
  color: var(--nx-text);
  font-weight: 600;
}

.nx-pagination,
.nx-pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nx-pagination-control,
.nx-pagination-page {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  color: var(--nx-text);
  text-decoration: none;
  font-size: 13px;
  line-height: 18px;
}

.nx-pagination-page {
  padding-inline: 8px;
}

.nx-pagination-control:hover,
.nx-pagination-page:hover {
  background: var(--nx-hover);
}

.nx-pagination-control:focus-visible,
.nx-pagination-page:focus-visible,
.nx-filter-chip-remove:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: 2px;
}

.nx-pagination-page.is-current {
  border-color: var(--nx-primary);
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-weight: 700;
}

.nx-pagination-control.is-disabled {
  cursor: not-allowed;
  opacity: .48;
}

.nx-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 8px 0 10px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: var(--nx-surface);
  color: var(--nx-text);
  font-size: 12px;
  line-height: 16px;
}

.nx-filter-chip-label {
  color: var(--nx-text-muted);
}

.nx-filter-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-filter-chip-remove {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--nx-text-muted);
  text-decoration: none;
  font-size: 15px;
}

.nx-filter-chip-remove:hover {
  background: var(--nx-hover);
  color: var(--nx-text);
}

@media (max-width: 640px) {
  .nx-entity-identity {
    width: 100%;
  }

  .nx-entity-status {
    margin-left: 0;
  }

  .nx-pagination {
    justify-content: space-between;
  }

  .nx-pagination-pages {
    order: 3;
    width: 100%;
  }
}

/* Shared UI Gallery reference */
.nx-gallery {
  display: grid;
  gap: var(--nx-space-6);
}

.nx-gallery-section {
  display: grid;
  gap: var(--nx-space-4);
  padding-block: var(--nx-space-2) var(--nx-space-6);
  border-bottom: 1px solid var(--nx-divider);
}

.nx-gallery-section:last-child {
  border-bottom: 0;
}

.nx-gallery-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nx-space-3);
}

.nx-gallery-section-head h3,
.nx-gallery-sample h4 {
  margin: 0;
}

.nx-gallery-section-head p,
.nx-gallery-sample p {
  margin: 4px 0 0;
}

.nx-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nx-space-4);
}

.nx-gallery-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-gallery-sample {
  min-width: 0;
  padding: var(--nx-space-4);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
}

.nx-gallery-sample--flat {
  padding: 0;
  border: 0;
  background: transparent;
}

.nx-gallery-sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-space-2);
  margin-bottom: var(--nx-space-3);
}

.nx-gallery-code {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: var(--nx-surface-subtle);
  color: var(--nx-text-muted);
  font: 600 11px/16px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nx-gallery-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
}

.nx-gallery-status--available {
  background: var(--nx-success-bg);
  color: var(--nx-success);
}

.nx-gallery-status--planned {
  background: var(--nx-warning-bg);
  color: var(--nx-warning);
}

.nx-gallery-actions,
.nx-gallery-status-row,
.nx-gallery-choice-row,
.nx-gallery-tags,
.nx-gallery-pagination,
.nx-gallery-breadcrumbs,
.nx-gallery-segmented {
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
  flex-wrap: wrap;
}

.nx-gallery-foundation {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--nx-space-4);
}

.nx-gallery-type {
  display: grid;
  gap: 8px;
}

.nx-gallery-type .is-h1 { font-size: 32px; line-height: 40px; font-weight: 700; }
.nx-gallery-type .is-h2 { font-size: 28px; line-height: 36px; font-weight: 700; }
.nx-gallery-type .is-body { font-size: 14px; line-height: 20px; }
.nx-gallery-type .is-caption { color: var(--nx-text-muted); font-size: 12px; line-height: 16px; font-weight: 500; }

.nx-gallery-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nx-space-2);
}

.nx-gallery-swatch {
  min-height: 64px;
  display: grid;
  align-content: end;
  padding: 8px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
}

.nx-gallery-swatch--surface { background: var(--nx-surface); }
.nx-gallery-swatch--subtle { background: var(--nx-surface-subtle); }
.nx-gallery-swatch--primary { background: var(--nx-primary); color: white; }
.nx-gallery-swatch--success { background: var(--nx-success-bg); color: var(--nx-success); }
.nx-gallery-swatch--warning { background: var(--nx-warning-bg); color: var(--nx-warning); }
.nx-gallery-swatch--danger { background: var(--nx-danger-bg); color: var(--nx-danger); }

.nx-gallery-media-load-sample {
  width: 96px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--nx-radius-lg);
}

.nx-gallery-media-load-sample .nx-media-load {
  height: 100%;
}

.nx-gallery-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--nx-surface-subtle);
}

.nx-gallery-progress > span {
  display: block;
  height: 100%;
  width: 68%;
  border-radius: inherit;
  background: var(--nx-primary);
}

.nx-gallery-alerts {
  display: grid;
  gap: var(--nx-space-2);
}

.nx-gallery-alert {
  padding: 10px 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  font-size: 13px;
}

.nx-gallery-alert--info { border-color: color-mix(in srgb, var(--nx-info) 38%, var(--nx-border)); color: var(--nx-info); }
.nx-gallery-alert--success { border-color: color-mix(in srgb, var(--nx-success) 38%, var(--nx-border)); color: var(--nx-success); }
.nx-gallery-alert--warning { border-color: color-mix(in srgb, var(--nx-warning) 38%, var(--nx-border)); color: var(--nx-warning); }
.nx-gallery-alert--danger { border-color: color-mix(in srgb, var(--nx-danger) 38%, var(--nx-border)); color: var(--nx-danger); }

.nx-reference-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  padding: 10px 11px;
  background: var(--nx-bg);
  color: var(--nx-text);
  font: inherit;
}

.nx-reference-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.nx-reference-checkbox,
.nx-reference-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--nx-border);
  background: var(--nx-bg);
  cursor: pointer;
}

.nx-reference-checkbox { border-radius: 5px; }
.nx-reference-radio { border-radius: 50%; }

.nx-reference-checkbox:checked,
.nx-reference-radio:checked {
  border-color: var(--nx-primary);
  background: var(--nx-primary);
  box-shadow: inset 0 0 0 4px var(--nx-bg);
}

.nx-reference-switch {
  width: 38px;
  height: 22px;
  position: relative;
  border: 0;
  border-radius: 999px;
  background: var(--nx-primary);
}

.nx-reference-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
}

.nx-gallery-segmented {
  width: fit-content;
  padding: 3px;
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface-subtle);
}

.nx-gallery-segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--nx-text-muted);
}

.nx-gallery-segmented button[aria-pressed="true"] {
  background: var(--nx-surface);
  color: var(--nx-text);
  box-shadow: 0 0 0 1px var(--nx-border);
}

.nx-gallery-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-size: 12px;
  font-weight: 600;
}

.nx-gallery-entity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nx-gallery-entity .nx-avatar {
  flex: 0 0 auto;
}

.nx-gallery-entity-copy {
  min-width: 0;
  display: grid;
}

.nx-gallery-entity-copy strong,
.nx-gallery-entity-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-gallery-entity-copy span {
  color: var(--nx-text-muted);
  font-size: 12px;
}

.nx-gallery-breadcrumbs {
  color: var(--nx-text-muted);
  font-size: 13px;
}

.nx-gallery-breadcrumbs strong {
  color: var(--nx-text);
}

.nx-gallery-pagination button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  color: var(--nx-text);
}

.nx-gallery-pagination button[aria-current="page"] {
  border-color: var(--nx-primary);
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
}

.nx-gallery-overlay-preview {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px dashed var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface-subtle);
}

.nx-gallery-sheet {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(260px, 72%);
  padding: var(--nx-space-4);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
}

.nx-gallery-menu-preview {
  width: min(220px, 100%);
  padding: 6px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
}

.nx-gallery-tooltip {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--nx-text);
  color: var(--nx-bg);
  font-size: 11px;
  line-height: 14px;
}

.nx-gallery-dropzone {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: var(--nx-space-4);
  border: 1px dashed var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface-subtle);
  text-align: center;
  color: var(--nx-text-muted);
}

.nx-gallery-file-row,
.nx-gallery-notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-space-3);
  padding: 10px 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
}

.nx-gallery-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.nx-gallery-step {
  min-width: 0;
  padding: 8px 10px;
  border-top: 2px solid var(--nx-divider);
  color: var(--nx-text-muted);
  font-size: 12px;
}

.nx-gallery-step.is-active {
  border-color: var(--nx-primary);
  color: var(--nx-text);
  font-weight: 600;
}

.nx-gallery-timeline {
  display: grid;
  gap: 0;
}

.nx-gallery-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: var(--nx-space-4);
}

.nx-gallery-timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--nx-divider);
}

.nx-gallery-timeline-item:last-child::before {
  display: none;
}

.nx-gallery-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--nx-primary);
  box-shadow: 0 0 0 3px var(--nx-primary-soft);
}

.nx-gallery-capacity {
  display: grid;
  gap: 8px;
}

.nx-gallery-capacity-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.nx-gallery-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.nx-gallery-calendar > span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nx-border);
  border-radius: 8px;
  background: var(--nx-surface);
  font-size: 12px;
}

.nx-gallery-calendar > span.is-today {
  border-color: var(--nx-primary);
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-weight: 700;
}

.nx-gallery-calendar > span.is-muted {
  color: var(--nx-text-muted);
  background: var(--nx-surface-subtle);
}

.nx-gallery-schedule {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 12px;
}

.nx-gallery-schedule-block {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-left: 3px solid var(--nx-primary);
  border-radius: 0 var(--nx-radius-md) var(--nx-radius-md) 0;
  background: var(--nx-primary-soft);
}

.nx-gallery-widget {
  min-height: 180px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
}

.nx-gallery-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--nx-divider);
}

.nx-gallery-widget-body {
  padding: 14px;
}

.nx-gallery-metric-value {
  margin-top: 6px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.nx-gallery-delta {
  color: var(--nx-success);
  font-size: 12px;
  font-weight: 700;
}

.nx-gallery-chart {
  min-height: 120px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding-top: var(--nx-space-4);
}

.nx-gallery-chart > span {
  flex: 1 1 0;
  min-width: 8px;
  border-radius: 5px 5px 0 0;
  background: var(--nx-primary-soft);
  border-top: 2px solid var(--nx-primary);
}

.nx-gallery-chart > span:nth-child(1) { height: 38%; }
.nx-gallery-chart > span:nth-child(2) { height: 62%; }
.nx-gallery-chart > span:nth-child(3) { height: 48%; }
.nx-gallery-chart > span:nth-child(4) { height: 82%; }
.nx-gallery-chart > span:nth-child(5) { height: 70%; }
.nx-gallery-chart > span:nth-child(6) { height: 94%; }

.nx-gallery-advisory {
  padding: var(--nx-space-4);
  border: 1px solid color-mix(in srgb, var(--nx-info) 30%, var(--nx-border));
  border-radius: var(--nx-radius-lg);
  background: color-mix(in srgb, var(--nx-info) 7%, var(--nx-surface));
}

@media (max-width: 980px) {
  .nx-gallery-grid,
  .nx-gallery-grid--three,
  .nx-gallery-foundation {
    grid-template-columns: 1fr;
  }

  .nx-gallery-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nx-gallery-section-head {
    display: grid;
  }

  .nx-gallery-actions .nx-button {
    flex: 1 1 auto;
  }

  .nx-gallery-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nx-gallery-steps {
    grid-template-columns: 1fr;
  }

  .nx-gallery-schedule {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}


.nx-gallery-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: var(--nx-surface);
  color: var(--nx-text);
  font-size: 12px;
  font-weight: 600;
}

.nx-gallery-icon-strip {
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
  flex-wrap: wrap;
}

.nx-gallery-icon-tile {
  min-width: 72px;
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  color: var(--nx-text-muted);
  font-size: 10px;
}

.nx-gallery-sort-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-space-3);
  padding: 10px 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
}

.nx-gallery-toast-preview {
  width: min(360px, 100%);
  padding: 11px 13px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
}

.nx-gallery-danger-block {
  padding: var(--nx-space-4);
  border: 1px solid color-mix(in srgb, var(--nx-danger) 35%, var(--nx-border));
  border-radius: var(--nx-radius-lg);
  background: color-mix(in srgb, var(--nx-danger) 6%, var(--nx-surface));
}

.nx-gallery-backup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--nx-space-3);
  padding: 10px 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
}

@media (max-width: 640px) {
  .nx-gallery-backup-row {
    grid-template-columns: 1fr;
  }
}


.nx-checkbox-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nx-checkbox-control {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: var(--nx-text);
  cursor: pointer;
}

.nx-checkbox-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}

.nx-checkbox-box {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid var(--nx-border);
  border-radius: 5px;
  background: var(--nx-bg);
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.nx-checkbox-box::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}

.nx-checkbox-input:checked + .nx-checkbox-box {
  border-color: var(--nx-primary);
  background: var(--nx-primary);
}

.nx-checkbox-input:checked + .nx-checkbox-box::after {
  opacity: 1;
}

.nx-checkbox-input:focus-visible + .nx-checkbox-box {
  box-shadow: var(--nx-focus);
}

.nx-checkbox-input:disabled + .nx-checkbox-box,
.nx-checkbox-input:disabled ~ .nx-checkbox-label {
  opacity: .58;
}

.nx-checkbox-control:has(.nx-checkbox-input:disabled) {
  cursor: not-allowed;
}

.nx-checkbox-label {
  min-width: 0;
  line-height: 20px;
}

.nx-responsive-table tr[data-nx-row-href] {
  cursor: pointer;
}

.nx-responsive-table tr[data-nx-row-href]:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .nx-checkbox-box {
    transition-duration: .001ms;
  }
}


.nx-file-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.nx-file-picker-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nx-file-picker-dropzone {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-space-4);
  padding: var(--nx-space-4);
  border: 1px dashed var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  cursor: pointer;
  transition:
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

.nx-file-picker-dropzone:hover,
.nx-file-picker.is-drag-over .nx-file-picker-dropzone {
  border-color: color-mix(in srgb, var(--nx-primary) 55%, var(--nx-border));
  background: var(--nx-primary-soft);
}

.nx-file-picker-input:focus-visible + .nx-file-picker-dropzone {
  box-shadow: var(--nx-focus);
}

.nx-file-picker.is-accepted .nx-file-picker-dropzone {
  border-color: color-mix(in srgb, var(--nx-success) 65%, var(--nx-border));
}

.nx-file-picker.is-rejected .nx-file-picker-dropzone {
  border-color: color-mix(in srgb, var(--nx-danger) 72%, var(--nx-border));
  background: var(--nx-danger-bg);
}

.nx-file-picker.is-disabled {
  opacity: .58;
}

.nx-file-picker.is-disabled .nx-file-picker-dropzone {
  cursor: not-allowed;
}

.nx-file-picker-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.nx-file-picker-copy > strong {
  color: var(--nx-text);
  font-size: 14px;
  line-height: 20px;
}

.nx-file-picker-copy > span,
.nx-file-picker-selection {
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}

.nx-file-picker-action {
  flex: 0 0 auto;
  pointer-events: none;
}

.nx-file-picker--compact {
  gap: 6px;
}

.nx-file-picker--compact .nx-file-picker-dropzone {
  min-height: 0;
  align-items: stretch;
  flex-direction: column;
  gap: var(--nx-space-2);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.nx-file-picker--compact .nx-file-picker-copy {
  gap: 2px;
}


.nx-file-picker--photo-surface {
  gap: 0;
}

.nx-file-picker--photo-surface .nx-file-picker-dropzone {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-xl);
  background: var(--nx-surface-subtle);
}

.nx-file-picker--photo-surface .nx-file-picker-dropzone:hover,
.nx-file-picker--photo-surface.is-drag-over .nx-file-picker-dropzone {
  border-color: color-mix(in srgb, var(--nx-primary) 65%, var(--nx-border));
  background: var(--nx-primary-soft);
}

.nx-file-picker--photo-surface .nx-file-picker-photo-content {
  min-width: 0;
  min-height: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.nx-file-picker.is-uploading .nx-file-picker-dropzone {
  cursor: progress;
}

.nx-file-picker-upload-state {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: var(--nx-space-3);
  background: color-mix(in srgb, var(--nx-surface) 62%, transparent);
  backdrop-filter: blur(2px);
  cursor: progress;
}

.nx-file-picker-upload-state[hidden] {
  display: none;
}

.nx-file-picker-upload-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--nx-space-2);
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--nx-surface) 94%, transparent);
  box-shadow: var(--nx-shadow-sm);
  color: var(--nx-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.nx-file-picker-upload-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid color-mix(in srgb, var(--nx-primary) 24%, var(--nx-border));
  border-top-color: var(--nx-primary);
  border-radius: 50%;
  animation: nx-file-picker-spin .78s linear infinite;
}

@keyframes nx-file-picker-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-file-picker-upload-spinner {
    animation: none;
  }
}


.nx-file-picker-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--nx-text-muted);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--nx-surface-subtle);
}

.nx-file-picker-assistive {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nx-form-field--photo-surface {
  gap: 0;
}

.nx-color-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--nx-space-3);
  align-items: center;
}

.nx-color-picker {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--nx-border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nx-color-picker::-webkit-color-swatch-wrapper {
  padding: 3px;
}

.nx-color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.nx-color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.nx-color-picker:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}

.nx-color-picker:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.nx-color-hex-input {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.nx-file-picker--compact .nx-file-picker-copy > strong {
  font-size: 13px;
  line-height: 18px;
}

.nx-file-picker--compact .nx-file-picker-copy > span,
.nx-file-picker--compact .nx-file-picker-selection {
  font-size: 11px;
  line-height: 14px;
}

.nx-file-picker--compact .nx-file-picker-action {
  width: 100%;
  min-height: 32px;
  justify-content: center;
  padding: 0 10px;
}


@media (max-width: 640px) {
  .nx-file-picker-dropzone {
    align-items: stretch;
    flex-direction: column;
  }

  .nx-file-picker-action {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-file-picker-dropzone {
    transition-duration: .001ms;
  }
}


.nx-location-city {
  position: relative;
  min-width: 0;
}

.nx-location-city-input[aria-disabled="true"] {
  background: var(--nx-surface-subtle);
  color: var(--nx-text-muted);
  cursor: not-allowed;
}

.nx-location-city-status {
  min-height: 16px;
  margin-top: 4px;
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}

.nx-location-city-popover {
  position: fixed;
  z-index: 82;
  display: grid;
  gap: 2px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
}

.nx-location-city-popover[hidden] {
  display: none;
}

.nx-location-city-option {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--nx-radius-sm);
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nx-location-city-option:hover,
.nx-location-city-option.is-active {
  background: var(--nx-surface-subtle);
}

.nx-location-city-option:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}

@media (max-width: 640px) {
  .nx-location-city-popover {
    max-width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-location-city-option {
    scroll-behavior: auto;
  }
}


/* DS-FRM-009 Entity picker — technical pass, visual review pending */
.nx-entity-picker {
  position: relative;
  min-width: 0;
}

.nx-entity-picker-status {
  min-height: 16px;
  margin-top: 4px;
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}

.nx-entity-picker-popover {
  position: fixed;
  z-index: 82;
  display: grid;
  gap: 2px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
}

.nx-entity-picker-popover[hidden] {
  display: none;
}

.nx-entity-picker-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--nx-radius-sm);
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nx-entity-picker-option:hover,
.nx-entity-picker-option.is-active,
.nx-entity-picker-option[aria-selected="true"] {
  background: var(--nx-surface-subtle);
}

.nx-entity-picker-option:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}

.nx-entity-picker-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-size: 11px;
  font-weight: 700;
}

.nx-entity-picker-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.nx-entity-picker-copy strong,
.nx-entity-picker-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-entity-picker-copy span {
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}

.nx-entity-picker-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface-subtle);
}

.nx-entity-picker-selected .nx-entity-picker-copy {
  flex: 1 1 auto;
}

.nx-entity-picker-clear {
  flex: 0 0 auto;
  min-height: 30px;
  padding-inline: 8px;
}

/* DS-EXP-001 Export dialog — technical pass, visual review pending */
.nx-export-dialog {
  display: grid;
  gap: var(--nx-space-4);
}

.nx-export-fields {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.nx-export-period {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.nx-export-period legend,

.nx-export-period legend,
.nx-export-fields legend {
  margin-bottom: 2px;
  color: var(--nx-text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.nx-export-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nx-space-3);
}

.nx-export-feedback {
  padding: 10px 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  font-size: 13px;
  line-height: 18px;
}

.nx-export-feedback--success {
  border-color: color-mix(in srgb, var(--nx-success) 34%, var(--nx-border));
  background: color-mix(in srgb, var(--nx-success) 10%, transparent);
  color: var(--nx-success);
}

.nx-export-feedback--error {
  border-color: color-mix(in srgb, var(--nx-danger) 34%, var(--nx-border));
  background: color-mix(in srgb, var(--nx-danger) 10%, transparent);
  color: var(--nx-danger);
}

.nx-export-busy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nx-text-muted);
  font-size: 13px;
}

.nx-export-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--nx-border);
  border-top-color: var(--nx-primary);
  border-radius: 50%;
  animation: nx-export-spin .8s linear infinite;
}

@keyframes nx-export-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .nx-export-period-grid {
    grid-template-columns: 1fr;
  }

  .nx-entity-picker-popover {
    max-width: calc(100vw - 24px);
  }

  .nx-entity-picker-selected {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nx-entity-picker-clear {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-export-spinner {
    animation: none;
    border-top-color: var(--nx-border);
  }

  .nx-entity-picker-option {
    scroll-behavior: auto;
  }
}


/* DS-FRM-007 DATE — NExus-owned calendar */
.nx-date-picker {
  min-width: 0;
}

.nx-date-picker-input-wrap {
  position: relative;
}

.nx-date-picker-input-wrap > .nx-date-input {
  width: 100%;
  padding-right: 42px;
  cursor: pointer;
}

.nx-date-picker-input-wrap > .nx-date-input:disabled {
  cursor: not-allowed;
}

.nx-date-picker-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--nx-text-muted);
}

.nx-date-picker-toggle:hover {
  color: var(--nx-text);
  background: var(--nx-hover);
}

.nx-date-popover {
  position: fixed;
  z-index: 240;
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  color: var(--nx-text);
  box-shadow: var(--nx-shadow-float);
}

.nx-date-popover[hidden] {
  display: none;
}

.nx-date-calendar-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.nx-date-calendar-month {
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 650;
}

.nx-date-calendar-nav {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
}

.nx-date-calendar-nav--previous .nx-icon {
  transform: rotate(180deg);
}

.nx-date-calendar-weekdays,
.nx-date-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.nx-date-calendar-weekdays {
  margin-bottom: 4px;
}

.nx-date-calendar-weekdays > span {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--nx-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.nx-date-calendar-day {
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--nx-radius-md);
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  cursor: pointer;
}

.nx-date-calendar-day:hover:not(:disabled) {
  background: var(--nx-hover);
}

.nx-date-calendar-day:focus-visible {
  outline: 2px solid var(--nx-focus);
  outline-offset: 1px;
}

.nx-date-calendar-day.is-outside {
  color: var(--nx-text-muted);
  opacity: .58;
}

.nx-date-calendar-day.is-today {
  border-color: var(--nx-primary);
}

.nx-date-calendar-day.is-selected {
  border-color: var(--nx-primary);
  background: var(--nx-primary);
  color: white;
}

.nx-date-calendar-day:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.nx-date-calendar-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--nx-space-2);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--nx-divider);
}

@media (max-width: 640px) {
  .nx-date-popover {
    top: auto !important;
    right: 10px;
    bottom: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none;
    padding: 14px;
    border-radius: var(--nx-radius-xl);
  }

  .nx-date-calendar-day {
    min-height: 42px;
  }
}


.nx-gallery-date-range > .nx-form-field {
  flex: 1 1 180px;
  min-width: 180px;
}


/* DS-FRM-007 TIME — NExus-owned 24-hour picker */
.nx-time-picker { min-width: 0; }
.nx-time-picker-input-wrap { position: relative; }
.nx-time-picker-input-wrap > .nx-time-input {
  width: 100%;
  padding-right: 42px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.nx-time-picker-input-wrap > .nx-time-input:disabled { cursor: not-allowed; }
.nx-time-picker-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--nx-text-muted);
}
.nx-time-picker-toggle:hover {
  color: var(--nx-text);
  background: var(--nx-hover);
}
.nx-time-popover {
  position: fixed;
  z-index: 240;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  color: var(--nx-text);
  box-shadow: var(--nx-shadow-float);
}
.nx-time-popover[hidden] { display: none; }
.nx-time-picker-summary {
  margin-bottom: 10px;
  text-align: center;
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nx-time-picker-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
}
.nx-time-picker-column { min-width: 0; }
.nx-time-picker-column-label {
  display: block;
  margin-bottom: 6px;
  color: var(--nx-text-muted);
  text-align: center;
  font-size: 11px;
  line-height: 16px;
  font-weight: 650;
}
.nx-time-picker-separator {
  align-self: center;
  color: var(--nx-text-muted);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}
.nx-time-picker-list {
  display: grid;
  gap: 3px;
  max-height: 216px;
  overflow-y: auto;
  padding: 3px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-bg);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.nx-time-picker-option {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--nx-radius-md);
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.nx-time-picker-option:hover:not(:disabled) { background: var(--nx-hover); }
.nx-time-picker-option:focus-visible {
  outline: 2px solid var(--nx-focus);
  outline-offset: 1px;
}
.nx-time-picker-option.is-selected {
  border-color: var(--nx-primary);
  background: var(--nx-primary);
  color: white;
  font-weight: 700;
}
.nx-time-picker-option:disabled { cursor: not-allowed; opacity: .28; }
.nx-time-picker-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--nx-space-2);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--nx-divider);
}
@media (max-width: 640px) {
  .nx-time-popover {
    top: auto !important;
    right: 10px;
    bottom: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none;
    padding: 14px;
    border-radius: var(--nx-radius-xl);
  }
  .nx-time-picker-list { max-height: min(34vh, 260px); }
  .nx-time-picker-option { min-height: 42px; }
}


/* DS-OVR-007 Entity Workspace + DS-OVR-003 Sheet + DS-SCH-001 Assignment */
.nx-dialog[open] {
  animation: nx-dialog-open .2s cubic-bezier(.22,.61,.36,1);
}
.nx-dialog[open]::backdrop {
  animation: nx-dialog-backdrop-in .18s ease;
}
@keyframes nx-dialog-open {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nx-dialog-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nx-tab-panel:not([hidden]) {
  animation: nx-tab-panel-enter .15s ease both;
}
@keyframes nx-tab-panel-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nx-entity-workspace-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
  overflow: hidden;
}
.nx-entity-workspace-frame {
  display: grid;
  overflow: hidden;
  border-radius: inherit;
  background: var(--nx-surface);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.nx-entity-workspace-body {
  position: relative;
  min-height: 0;
  overflow: auto;
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"] {
  height: auto;
  max-height: min(760px, calc(100dvh - 32px));
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"]
  .nx-entity-workspace-frame {
  height: auto;
  max-height: inherit;
  grid-template-rows: auto minmax(0, auto);
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"]
  .nx-entity-workspace-body {
  max-height: min(660px, calc(100dvh - 132px));
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"].has-companion-sheet {
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"].has-companion-sheet
  .nx-entity-workspace-frame {
  height: 100%;
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr);
}
.nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"].has-companion-sheet
  .nx-entity-workspace-body {
  max-height: none;
}

.nx-entity-workspace-heading { min-width: 0; }
.nx-entity-workspace-actions {
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
  margin-left: auto;
}
.nx-workspace-close { flex: 0 0 auto; }

.nx-entity-workspace-dialog.has-companion-sheet {
  overflow: visible;
  transition: margin-inline-start .2s cubic-bezier(.22,.61,.36,1);
}

.nx-sheet {
  position: absolute;
  z-index: 12;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(390px, 42%);
  min-width: 300px;
  border-left: 1px solid var(--nx-border);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-float);
  transform: translateX(0);
  transition:
    width .18s cubic-bezier(.22,.61,.36,1),
    transform .2s cubic-bezier(.22,.61,.36,1),
    opacity .16s ease;
}
.nx-sheet--companion {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  right: auto;
  bottom: auto;
  width: var(--nx-sheet-width, 340px);
  min-width: 280px;
  height: var(--nx-sheet-height, 100%);
  max-height: none;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-xl);
  overflow: hidden;
  box-sizing: border-box;
}

.nx-sheet[hidden] { display: none; }
.nx-sheet.is-entering { animation: nx-sheet-enter .2s cubic-bezier(.22,.61,.36,1) both; }
@keyframes nx-sheet-enter {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
.nx-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nx-space-3);
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--nx-divider);
}
.nx-sheet-heading {
  min-width: 0;
  flex: 1 1 auto;
}
.nx-sheet-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}
.nx-sheet-description {
  margin: 2px 0 0;
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}
.nx-sheet-actions {
  display: flex;
  align-items: center;
  gap: var(--nx-space-1);
}
.nx-sheet-body {
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: auto;
}

.nx-assignment-resource {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  color: var(--nx-text);
  text-align: left;
  cursor: grab;
  transition:
    border-color .14s ease,
    background .14s ease,
    transform .14s ease,
    box-shadow .14s ease;
}
.nx-assignment-resource:hover {
  background: var(--nx-hover);
}
.nx-assignment-resource:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}
.nx-assignment-resource.is-selected,
.nx-assignment-resource[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--nx-primary) 70%, var(--nx-border));
  background: var(--nx-primary-soft);
}
.nx-assignment-resource.is-dragging {
  opacity: .62;
  transform: scale(.985);
  cursor: grabbing;
}
.nx-assignment-target {
  border: 1px dashed var(--nx-border-strong);
  border-radius: var(--nx-radius-lg);
  transition:
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}
.nx-assignment-target[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .58;
}
.nx-assignment-target:not([aria-disabled="true"]) { cursor: pointer; }
.nx-assignment-target:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}
.nx-assignment-target.is-valid-drop {
  border-color: var(--nx-primary);
  background: var(--nx-primary-soft);
}
.nx-assignment-target.is-invalid-drop {
  border-color: var(--nx-danger);
  background: color-mix(in srgb, var(--nx-danger) 8%, var(--nx-surface));
}
.nx-assignment-target.is-busy { cursor: progress; opacity: .72; }

@media (max-width: 1460px) {
  .nx-entity-workspace-dialog.has-companion-sheet {
    overflow: visible;
    margin-inline: auto;
  }

  .nx-sheet--companion {
    position: fixed;
    top: var(--nx-sheet-top, 16px);
    right: 16px;
    bottom: auto;
    left: auto;
    width: min(var(--nx-sheet-width, 340px), calc(100vw - 32px));
    min-width: 280px;
    height: var(--nx-sheet-height, min(760px, calc(100dvh - 32px)));
    max-height: calc(100dvh - 32px);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-xl);
  }
}

@media (max-width: 760px) {
  .nx-entity-workspace-dialog,
  .nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"] {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
  }

  .nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"]
    .nx-entity-workspace-frame {
    height: 100%;
    max-height: none;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .nx-entity-workspace-dialog[data-nx-entity-workspace-density="content"]
    .nx-entity-workspace-body {
    max-height: none;
  }

  .nx-sheet--companion {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    min-width: 0;
    height: min(62dvh, 620px);
    max-height: calc(100dvh - 16px);
  }

  .nx-sheet:not(.nx-sheet--companion) {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-height: min(72%, 620px);
    border-top: 1px solid var(--nx-border);
    border-left: 0;
    box-shadow: var(--nx-shadow-float);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-dialog[open],
  .nx-dialog[open]::backdrop,
  .nx-tab-panel:not([hidden]),
  .nx-sheet.is-entering {
    animation-duration: .001ms;
  }
  .nx-sheet,
  .nx-entity-workspace-dialog.has-companion-sheet,
  .nx-assignment-resource,
  .nx-assignment-target {
    transition-duration: .001ms;
  }
}


[data-nx-assignment-source] {
  cursor: grab;
}
[data-nx-assignment-source].is-selected {
  box-shadow: var(--nx-focus);
}
[data-nx-assignment-source].is-dragging {
  opacity: .62;
  cursor: grabbing;
}
.nx-assignment-remove-target {
  transition:
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}
.nx-assignment-remove-target.is-valid-drop {
  background: var(--nx-primary-soft);
  box-shadow: inset 0 0 0 1px var(--nx-primary);
}
.nx-assignment-remove-target.is-invalid-drop {
  background: color-mix(in srgb, var(--nx-danger) 8%, var(--nx-surface));
  box-shadow: inset 0 0 0 1px var(--nx-danger);
}


/* DS-WDG-001 — shared module/dashboard widget shell */
.nx-widget {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  background: var(--nx-surface);
  box-shadow: var(--nx-shadow-elevated);
  overflow: hidden;
}
.nx-widget--compact { min-height: 148px; }
.nx-widget--standard { min-height: 180px; }
.nx-widget--wide { min-height: 220px; }
.nx-widget-header {
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--nx-space-3);
  padding: 13px 15px;
  border-bottom: 1px solid var(--nx-divider);
}
.nx-widget-heading { min-width: 0; display: grid; gap: 2px; }
.nx-widget-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
}
.nx-widget-title-row h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.nx-widget-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--nx-text-muted);
}
.nx-widget-heading h3 { margin: 0; font-size: 14px; line-height: 20px; }
.nx-widget-context { color: var(--nx-text-muted); font-size: 12px; line-height: 16px; }
.nx-widget-actions { display: flex; align-items: center; gap: var(--nx-space-2); }
.nx-widget-body { min-width: 0; padding: 15px; }
.nx-widget-metrics {
  margin: 0 0 var(--nx-space-4);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--nx-space-4);
}
.nx-widget-metric {
  min-width: 0;
  display: grid;
  gap: var(--nx-space-1);
}
.nx-widget-metric dt {
  color: var(--nx-text-muted);
  font-size: 12px;
  line-height: 16px;
}
.nx-widget-metric dd {
  margin: 0;
  color: var(--nx-text);
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.nx-widget-section {
  min-width: 0;
  display: grid;
  gap: var(--nx-space-3);
  padding-top: var(--nx-space-4);
  border-top: 1px solid var(--nx-divider);
}
.nx-widget-section h4 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.nx-widget-footer {
  padding: 10px 15px;
  border-top: 1px solid var(--nx-divider);
  color: var(--nx-text-muted);
  font-size: 12px;
}
.nx-widget.is-edit {
  border-color: color-mix(in srgb, var(--nx-primary) 28%, var(--nx-border));
}
.nx-widget.is-loading .nx-widget-body { opacity: .76; }
.nx-widget.is-error {
  border-color: color-mix(in srgb, var(--nx-danger) 28%, var(--nx-border));
}
.nx-widget .nx-state { min-height: 112px; padding: var(--nx-space-3); }
@media (max-width: 640px) {
  .nx-widget-header { padding: 12px; }
  .nx-widget-body { padding: 12px; }
  .nx-widget-footer { padding: 9px 12px; }
}



/* DS-WDG-002 — shared Dashboard layout interaction */
.nx-dashboard-layout-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--nx-space-2);
  padding: 10px 12px;
  border-top: 1px solid var(--nx-divider);
  background: color-mix(in srgb, var(--nx-surface) 94%, var(--nx-primary-soft));
}
.nx-dashboard-layout-sizes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
}
.nx-dashboard-layout-size {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: calc(var(--nx-radius-md) - 2px);
  background: transparent;
  color: var(--nx-text-muted);
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
}
.nx-dashboard-layout-size:hover {
  background: var(--nx-hover);
  color: var(--nx-text);
}
.nx-dashboard-layout-size:focus-visible,
.nx-dashboard-layout-move:focus-visible {
  outline: none;
  box-shadow: var(--nx-focus);
}
.nx-dashboard-layout-size[aria-pressed="true"] {
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-weight: 600;
}
[data-nx-dashboard-layout-item] {
  min-width: 0;
  transition:
    transform .14s ease,
    opacity .14s ease,
    box-shadow .14s ease;
}
[data-nx-dashboard-layout-item].is-dashboard-layout-dragging {
  opacity: .58;
  transform: scale(.99);
}
[data-nx-dashboard-layout-item].is-dashboard-layout-target {
  box-shadow: inset 0 0 0 2px var(--nx-primary);
}
[data-nx-dashboard-layout-item].is-dashboard-layout-busy {
  cursor: progress;
  opacity: .72;
}
[data-nx-dashboard-layout-item].is-dashboard-layout-error {
  box-shadow: inset 0 0 0 1px var(--nx-danger);
}
[data-nx-dashboard-layout][data-nx-dashboard-editing="true"] [data-nx-dashboard-layout-item] {
  cursor: grab;
}
[data-nx-dashboard-layout][data-nx-dashboard-editing="true"] [data-nx-dashboard-layout-item]:active {
  cursor: grabbing;
}
@media (max-width: 640px) {
  .nx-dashboard-layout-controls {
    align-items: stretch;
  }
  .nx-dashboard-layout-sizes {
    order: 3;
    width: 100%;
  }
  .nx-dashboard-layout-size {
    flex: 1 1 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-nx-dashboard-layout-item] {
    transition-duration: .001ms;
  }
}
