/*
 * SairikLabs shared UI primitives and Round 19 progressive-enhancement layer.
 * Loaded after the page-specific styles so these contracts remain predictable.
 */
:root {
  --ui-control-height: 44px;
  --ui-control-radius: var(--radius-xs);
  --ui-card-radius: var(--radius-md);
  --ui-card-border: var(--border);
  --ui-focus-ring: 0 0 0 3px color-mix(in oklch, var(--color-focus) 28%, transparent);
  --ui-success: var(--color-success);
  --ui-success-soft: var(--color-success-soft);
  --ui-warning: var(--color-warning);
  --ui-warning-soft: var(--color-warning-soft);
  --ui-danger-soft: var(--color-danger-soft);
}

/* Reusable primitives. */
.ui-card {
  border: 1px solid var(--ui-card-border);
  border-radius: var(--ui-card-radius);
  background: var(--background);
  box-shadow: var(--shadow-sm);
}
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
}
.ui-badge.success { background: var(--ui-success-soft); color: var(--ui-success); }
.ui-badge.warning { background: var(--ui-warning-soft); color: var(--ui-warning); }
.ui-badge.danger { background: var(--ui-danger-soft); color: var(--danger); }
.ui-segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--muted) 76%, var(--background));
}
.ui-segmented > button,
.ui-segmented > a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: .74rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.ui-segmented > button:hover,
.ui-segmented > a:hover { color: var(--foreground); }
.ui-segmented > button.active,
.ui-segmented > button[aria-pressed="true"],
.ui-segmented > a.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgb(20 20 19 / .1);
}
.ui-segmented .ui-icon { width: 14px; height: 14px; }

/* Administrator quick launcher in the account popover. */
.account-menu-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 9px 5px;
}
.account-menu-group-title span {
  color: var(--foreground);
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-menu-group-title small {
  color: var(--muted-foreground);
  font-size: .61rem;
}
.account-menu-links a { position: relative; }
.account-menu-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1;
}
.account-menu-count.danger {
  background: var(--ui-danger-soft);
  color: var(--danger);
}

/* Page-specific navigation skeletons. */
.page-loading-card:has(.route-skeleton-admin),
.page-loading-card:has(.route-skeleton-imageai) { width: min(1040px, 100%); }
.page-loading-card:has(.route-skeleton-settings) { width: min(780px, 100%); }
.page-loading-card .route-skeleton { width: 100%; margin: 0; padding: 0; }
.route-skeleton {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 70px;
}
.route-skeleton-admin,
.route-skeleton-settings,
.route-skeleton-imageai { display: grid; gap: 18px; }
.route-skeleton-heading { display: grid; gap: 10px; max-width: 470px; }
.route-skeleton-heading i,
.route-skeleton-heading b,
.route-skeleton-heading span,
.route-skeleton-pills i,
.route-skeleton-toolbar i,
.route-skeleton-toolbar b,
.route-skeleton-table i,
.route-skeleton-table span,
.route-skeleton-settings header i,
.route-skeleton-settings header b,
.route-skeleton-form span,
.route-skeleton-workbench header,
.route-skeleton-workbench span,
.route-skeleton-drop,
.route-skeleton-previews i {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--muted) 20%, color-mix(in srgb, var(--muted) 55%, white) 50%, var(--muted) 80%);
  background-size: 240% 100%;
  animation: ui-skeleton-wave 1.25s ease-in-out infinite;
}
.route-skeleton-heading i { width: 104px; height: 12px; }
.route-skeleton-heading b { width: min(390px, 78vw); height: 36px; }
.route-skeleton-heading span { width: min(470px, 86vw); height: 16px; }
.route-skeleton-pills { display: flex; gap: 8px; overflow: hidden; }
.route-skeleton-pills i { width: 112px; height: 38px; flex: 0 0 auto; border-radius: 10px; }
.route-skeleton-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) 124px;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.route-skeleton-toolbar i,
.route-skeleton-toolbar b { height: 40px; }
.route-skeleton-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
}
.route-skeleton-table header,
.route-skeleton-table > div { display: grid; grid-template-columns: 1.3fr 1.6fr 1fr .8fr 1fr; gap: 22px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.route-skeleton-table > div:last-child { border-bottom: 0; }
.route-skeleton-table i { height: 10px; }
.route-skeleton-table span { height: 13px; }
.route-skeleton-settings { max-width: 850px; }
.route-skeleton-settings section {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
}
.route-skeleton-settings section header { display: grid; gap: 8px; }
.route-skeleton-settings section header i { width: 190px; height: 19px; }
.route-skeleton-settings section header b { width: 300px; max-width: 80%; height: 12px; }
.route-skeleton-form { display: grid; gap: 13px; }
.route-skeleton-form span { height: 46px; }
.route-skeleton-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.route-skeleton-workbench section,
.route-skeleton-workbench aside { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; }
.route-skeleton-workbench header { width: 190px; height: 18px; }
.route-skeleton-drop { height: 138px; border-radius: 15px; }
.route-skeleton-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.route-skeleton-previews i { min-height: 220px; border-radius: 15px; }
.route-skeleton-workbench aside span { height: 58px; }
@keyframes ui-skeleton-wave { 0% { background-position: 110% 0; } 100% { background-position: -110% 0; } }

/* Admin dataset-specific cells. */
.admin-identity-cell,
.admin-email-chip,
.admin-message-preview {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-identity-cell { display: inline-flex; align-items: center; gap: 10px; }
.admin-identity-cell > span:last-child,
.admin-primary-secondary { display: grid; min-width: 0; gap: 2px; }
.admin-identity-cell strong,
.admin-primary-secondary strong,
.admin-message-preview strong { overflow: hidden; color: var(--foreground); font-size: .78rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity-cell small,
.admin-primary-secondary small,
.admin-message-preview small { overflow: hidden; color: var(--muted-foreground); font-size: .67rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-avatar,
.admin-detail-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 10%, var(--muted));
  color: var(--primary);
  font-weight: 800;
}
.admin-row-avatar { width: 34px; height: 34px; font-size: .7rem; }
.admin-detail-avatar { width: 50px; height: 50px; font-size: .9rem; }
.admin-row-avatar img,
.admin-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-email-chip { display: inline-flex; min-width: 0; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px; }
.admin-email-chip:hover { background: var(--muted); color: var(--primary); }
.admin-email-chip .ui-icon { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted-foreground); }
.admin-email-chip .ui-icon.verified { color: var(--ui-success); }
.admin-email-chip .ui-icon.unverified { color: var(--ui-warning); }
.admin-email-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-message-preview { display: grid; width: min(340px, 100%); gap: 3px; }
.admin-message-preview:hover strong { color: var(--primary); }
.admin-amount { font-size: .84rem; font-variant-numeric: tabular-nums; }
.admin-amount.positive { color: var(--ui-success); }
.admin-amount.negative { color: var(--danger); }
.admin-progress-cell { display: grid; grid-template-columns: minmax(70px, 1fr) 38px; align-items: center; gap: 9px; min-width: 130px; }
.admin-progress-cell > span { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: var(--muted); }
.admin-progress-cell i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #f0b28f)); }
.admin-progress-cell b { color: var(--muted-foreground); font-size: .68rem; font-variant-numeric: tabular-nums; text-align: right; }
.admin-compact-code { display: inline-block; max-width: 190px; overflow: hidden; padding: 4px 7px; border-radius: 7px; background: var(--muted); color: var(--foreground); font-size: .66rem; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.admin-wrap-cell { max-width: 360px; white-space: normal; }
.admin-status-actions form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 12px; }
.admin-user-actions.is-mutating { opacity: .62; pointer-events: none; }
.admin-data-card tbody tr.mutation-success { animation: admin-mutation-success 1.2s ease-out; }
@keyframes admin-mutation-success { 0%, 28% { background: color-mix(in srgb, var(--ui-success-soft) 82%, transparent); } 100% { background: transparent; } }

/* Searchable single-select facets. The native select remains the no-JS contract. */
.admin-filter-field { display: grid; min-width: 0; gap: 7px; }
.admin-filter-field > span { color: var(--foreground); font-size: .72rem; font-weight: 600; }
.admin-filter-field:has(> select.admin-facet-native) { position: relative; }
.admin-facet-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.admin-facet-filter { position: relative; min-width: 0; }
.admin-facet-trigger {
  display: grid;
  width: 100%;
  min-height: var(--ui-control-height);
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--ui-control-radius);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-facet-trigger > span { overflow: hidden; color: var(--muted-foreground); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-facet-trigger > strong { max-width: 105px; overflow: hidden; color: var(--foreground); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-facet-trigger.has-value { border-color: color-mix(in srgb, var(--primary) 42%, var(--border)); background: color-mix(in srgb, var(--primary) 4%, var(--background)); }
.admin-facet-trigger .ui-icon { width: 13px; height: 13px; color: var(--muted-foreground); transition: transform .15s ease; }
.admin-facet-filter.open .admin-facet-trigger .ui-icon { transform: rotate(180deg); }
.admin-facet-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  min-width: 220px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  box-shadow: var(--shadow-lg);
}
.admin-facet-panel[hidden] { display: none !important; }
.admin-facet-search { position: relative; display: block; }
.admin-facet-search .ui-icon { position: absolute; top: 50%; left: 10px; width: 14px; height: 14px; color: var(--muted-foreground); transform: translateY(-50%); pointer-events: none; }
.admin-facet-panel input { width: 100%; min-height: 36px; padding-left: 31px; border-radius: 8px; font-size: .72rem; }
.admin-facet-options { display: grid; max-height: 220px; overflow: auto; gap: 2px; margin-top: 7px; }
.admin-facet-option {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: .72rem;
  text-align: left;
  cursor: pointer;
}
.admin-facet-option:hover,
.admin-facet-option[aria-selected="true"] { background: var(--muted); color: var(--primary); }
.admin-facet-option .ui-icon { width: 13px; height: 13px; }
.admin-facet-options p { margin: 10px; color: var(--muted-foreground); font-size: .7rem; text-align: center; }
.admin-facet-clear { width: 100%; margin-top: 6px; padding: 8px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--primary); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; }

/* Preserve old rows while an async request refreshes them. */
.admin-data-card { position: relative; }
.admin-data-card.is-loading { min-height: 0; }
.admin-data-card .admin-loading-overlay {
  position: absolute;
  z-index: 14;
  inset: auto 0 auto 0;
  bottom: auto;
  backdrop-filter: none;
  display: none;
  height: 3px;
  overflow: hidden;
  padding: 0;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  pointer-events: none;
}
.admin-data-card .admin-loading-overlay > * { display: none !important; }
.admin-data-card.is-loading .admin-loading-overlay { display: block; }
.admin-data-card.is-loading .admin-loading-overlay::after {
  position: absolute;
  inset: 0;
  width: 38%;
  background: var(--primary);
  content: "";
  animation: admin-progress-slide .9s ease-in-out infinite;
}
.admin-data-card.is-loading .admin-responsive-table,
.admin-data-card.is-loading .admin-table-tools { opacity: .62; transition: opacity .15s ease; }
.admin-data-card.is-refreshing .admin-responsive-table,
.admin-data-card.is-refreshing .admin-table-tools { opacity: .82; }
@keyframes admin-progress-slide { from { transform: translateX(-110%); } to { transform: translateX(290%); } }

/* ImageAI micro-interactions. */
.preview-mode-switch { margin-top: 16px; }
.workbench-preview-grid[hidden],
.image-compare-slider[hidden],
.imageai-surface .workbench-preview-grid[hidden],
.imageai-surface .image-compare-slider[hidden] { display: none !important; }
.imageai-surface .workbench-preview-grid:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.imageai-surface .preview-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}
.imageai-surface .preview-label {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.imageai-surface .preview-meta {
  display: inline-flex !important;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
}
.imageai-surface .preview-reset {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}
.imageai-surface .preview-arrow {
  display: grid !important;
  place-items: center;
  align-self: start;
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin-top: 40px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--background));
  color: var(--primary);
  transform: none !important;
}
.imageai-surface .preview-arrow .ui-icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 1040px) {
  .imageai-surface .workbench-preview-grid:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .imageai-surface .preview-arrow {
    display: none !important;
  }
}
.image-compare-slider.checkerboard,
.image-compare-after.checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e6e3dc 25%, transparent 25%),
    linear-gradient(-45deg, #e6e3dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e3dc 75%),
    linear-gradient(-45deg, transparent 75%, #e6e3dc 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.workbench-preview-grid.preview-mode-before,
.workbench-preview-grid.preview-mode-after { grid-template-columns: minmax(0, 1fr); }
.imageai-surface .workbench-preview-grid.preview-mode-before:not([hidden]),
.imageai-surface .workbench-preview-grid.preview-mode-after:not([hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
.workbench-preview-grid.preview-mode-before .preview-panel:last-child,
.workbench-preview-grid.preview-mode-after .preview-panel:first-child,
.workbench-preview-grid.preview-mode-before .preview-arrow,
.workbench-preview-grid.preview-mode-after .preview-arrow { display: none; }
.imageai-surface .workbench-preview-grid.preview-mode-before .preview-arrow,
.imageai-surface .workbench-preview-grid.preview-mode-after .preview-arrow {
  display: none !important;
}
.processing-progress-track {
  display: block;
  width: min(180px, 68%);
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 18%, var(--background));
}
.processing-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .24s ease; }
.processing-overlay small { min-height: 1.25em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.workbench-actions [data-retry] { border-color: color-mix(in srgb, var(--danger) 36%, var(--border)); color: var(--danger); }
.workbench-actions [data-retry]:hover { border-color: var(--danger); background: var(--ui-danger-soft); color: var(--danger); }
/* Author display:flex/inline-flex on .button overrides the UA [hidden] rule. */
.workbench-actions [hidden] { display: none !important; }
.retry-cost-hint,
.success-rerun-hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}
.success-rerun-hint { color: color-mix(in srgb, var(--primary) 35%, var(--muted-foreground)); }

@media (max-width: 900px) {
  .route-skeleton-workbench { grid-template-columns: 1fr; }
  .route-skeleton-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-facet-panel { position: static; margin-top: 6px; box-shadow: var(--shadow-md); }
}
@media (max-width: 720px) {
  .route-skeleton { width: min(100% - 28px, 1160px); padding-top: 28px; }
  .route-skeleton-toolbar { grid-template-columns: 1fr; }
  .route-skeleton-table header { display: none; }
  .route-skeleton-table > div { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .route-skeleton-table > div span:nth-child(n+4) { display: none; }
  .route-skeleton-previews { grid-template-columns: 1fr; }
  .route-skeleton-previews i:last-child { display: none; }
  .account-menu-group-title { padding-top: 7px; }
  .admin-status-actions form { grid-template-columns: 1fr; }
  .admin-message-preview { width: 100%; }
  .admin-message-preview small,
  .admin-primary-secondary small { white-space: normal; }
  .preview-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .preview-mode-switch > button { min-width: 0; padding-inline: 7px; }
}
@media (max-width: 440px) {
  .ui-segmented > button,
  .ui-segmented > a { font-size: .68rem; }
  .route-skeleton-heading b { height: 30px; }
  .admin-email-chip { width: 100%; }
  .admin-email-chip span { white-space: normal; overflow-wrap: anywhere; }
  .admin-progress-cell { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .route-skeleton-heading i,
  .route-skeleton-heading b,
  .route-skeleton-heading span,
  .route-skeleton-pills i,
  .route-skeleton-toolbar i,
  .route-skeleton-toolbar b,
  .route-skeleton-table i,
  .route-skeleton-table span,
  .route-skeleton-settings header i,
  .route-skeleton-settings header b,
  .route-skeleton-form span,
  .route-skeleton-workbench header,
  .route-skeleton-workbench span,
  .route-skeleton-drop,
  .route-skeleton-previews i,
  .admin-data-card.is-loading .admin-loading-overlay::after,
  .admin-data-card tbody tr.mutation-success { animation: none !important; }
}

/* Round 36: shared control contracts. */
:where(.button, .icon-button, .ui-segmented > button, .ui-segmented > a) {
  transition-duration: var(--dur-micro);
  transition-timing-function: var(--ease-out);
}
:where(.button, .icon-button, .ui-segmented > button, .ui-segmented > a):active:not(:disabled, [aria-disabled="true"]) {
  transform: translateY(1px);
}
:where(.button, .icon-button, .ui-segmented > button, .ui-segmented > a):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: none;
}
:where(.button, .icon-button, .ui-segmented > button, .ui-segmented > a):is(:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}
:where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="range"], [type="file"]) {
  min-height: var(--ui-control-height);
  border-width: 1px;
  border-color: var(--color-rule-2);
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
:where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):focus-visible {
  border-color: var(--color-accent);
  outline-color: color-mix(in oklch, var(--color-focus) 72%, transparent);
  box-shadow: none;
}
textarea { resize: vertical; }

/* ImageAI batch processing */
.image-batch-panel{margin:1.5rem 0 0;padding:1.4rem;border:1px solid var(--border-color,#dbe3ec);border-radius:1rem;background:var(--surface,#fff);box-shadow:0 12px 32px rgba(15,23,42,.06)}
.image-batch-header,.image-batch-controls,.image-batch-progress,.image-batch-result,.image-batch-actions{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.image-batch-header h2{margin:.2rem 0}.image-batch-header p{margin:0;color:var(--muted-color,#64748b)}
.image-batch-controls{margin-top:1rem;align-items:stretch}.image-batch-picker{flex:1;display:flex;align-items:center;gap:.8rem;padding:1rem;border:1px dashed var(--border-color,#cbd5e1);border-radius:.8rem;cursor:pointer}.image-batch-picker input{position:absolute;inline-size:1px;block-size:1px;opacity:0}.image-batch-picker span{display:grid}.image-batch-picker small{color:var(--muted-color,#64748b)}
.image-batch-summary{margin-top:1rem}.image-batch-summary>div{display:flex;justify-content:space-between;gap:1rem}.image-batch-summary ol{max-height:14rem;overflow:auto;margin:.75rem 0 0;padding:0;list-style:none}.image-batch-summary li{display:flex;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px solid var(--border-color,#eef2f7)}
.image-batch-progress{margin-top:1rem}.image-batch-progress>span:first-child{display:grid;min-width:15rem}.image-batch-progress .processing-progress-track{flex:1}
.image-batch-results{display:grid;gap:.6rem;margin-top:1rem}.image-batch-result{padding:.75rem;border:1px solid var(--border-color,#e2e8f0);border-radius:.75rem}.image-batch-result>div{display:grid;flex:1}.image-batch-result small{color:var(--muted-color,#64748b)}.image-batch-result-status{min-width:5.5rem;font-size:.8rem;font-weight:700;text-transform:uppercase}.image-batch-result.succeeded .image-batch-result-status{color:#15803d}.image-batch-result.failed .image-batch-result-status{color:#b91c1c}.image-batch-actions{justify-content:flex-start;margin-top:1rem}
@media(max-width:720px){.image-batch-header,.image-batch-controls,.image-batch-progress{align-items:stretch;flex-direction:column}.image-batch-controls .button{width:100%}.image-batch-summary>div{flex-direction:column}.image-batch-result{align-items:flex-start;flex-wrap:wrap}.image-batch-result .button{margin-left:auto}}
