:root {
  --motion-media-zoom: 1.4;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #f6f4ef;
  color: #171717;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(140deg, rgba(25, 94, 106, 0.12), transparent 38%),
    linear-gradient(320deg, rgba(142, 55, 48, 0.13), transparent 34%),
    #f6f4ef;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
}

.admin-shell {
  width: min(100% - 32px, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-panel {
  width: min(100%, 400px);
  padding: 30px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 80px rgba(23, 23, 23, 0.11);
}

.brand-lockup {
  margin-bottom: 28px;
}

.brand-lockup p,
.app-header p,
.eyebrow {
  margin: 0 0 8px;
  color: #6a5f55;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.4rem;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.login-form,
.image-form {
  display: grid;
  gap: 20px;
}

label,
.search-field,
.select-field,
.readonly-field {
  display: grid;
  gap: 8px;
  color: #3d3934;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: #171717;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 126px;
  padding: 12px 13px;
  resize: vertical;
}

.readonly-field output {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 6px;
  background: #f4f0e8;
  color: #5b5249;
  font-weight: 700;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1b7280;
  outline: 3px solid rgba(27, 114, 128, 0.18);
}

input[type="file"] {
  min-height: auto;
  padding: 11px;
  background: #fbfaf6;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: #1d6572;
  color: #ffffff;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  padding: 0 18px;
  background: #171717;
  color: #ffffff;
}

.compact-button {
  min-height: 40px;
  padding: 0 16px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: #8d312b;
  font-size: 0.92rem;
}

.save-message {
  color: #3f6c4e;
  text-align: right;
}

.dashboard {
  width: 100%;
  min-height: calc(100vh - 64px);
}

.app-header,
.view-toolbar,
.filter-bar,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header {
  margin-bottom: 28px;
}

.section-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.section-tab {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #594f45;
  cursor: pointer;
  font-weight: 900;
}

.section-tab[aria-pressed="true"] {
  background: #171717;
  color: #ffffff;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: min(280px, 100vw - 32px);
  padding: 14px;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(23, 23, 23, 0.16);
}

.account-panel:not([hidden]) {
  display: grid;
  gap: 10px;
}

.account-panel .secondary-button {
  width: 100%;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-main-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.connection-status {
  min-width: 138px;
  color: #5b5249;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.connection-status.is-online {
  color: #287a48;
}

.connection-status.is-error {
  color: #a33a31;
}

.list-view,
.detail-view,
.admin-panel-view,
.form-section {
  width: 100%;
}

.view-toolbar {
  margin-bottom: 18px;
}

.detail-toolbar {
  align-items: flex-start;
}

.filter-bar {
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-field {
  flex: 1 1 260px;
}

.select-field {
  width: min(190px, 100%);
}

.backlog-sync-button {
  align-self: end;
}

.agent-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.backlog-sync-message {
  margin: -8px 0 16px;
  text-align: right;
}

.multi-select-field {
  position: relative;
  width: min(280px, 100%);
  display: grid;
  gap: 8px;
  color: #3d3934;
  font-size: 0.92rem;
  font-weight: 700;
}

.multi-select-button {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: #292621;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.multi-select-button::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #74695f;
  border-bottom: 2px solid #74695f;
  transform: translateY(-65%) rotate(45deg);
}

.multi-select-button[aria-expanded="true"]::after {
  transform: translateY(-35%) rotate(225deg);
}

.multi-select-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: min(520px, calc(100vw - 32px));
  overflow: visible;
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(23, 23, 23, 0.16);
}

.multi-select-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 6px;
}

.multi-select-presets {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 7px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.1);
}

.multi-select-presets button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(29, 101, 114, 0.22);
  border-radius: 6px;
  background: #eff6f6;
  color: #1d6572;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.multi-select-presets button:hover {
  background: #dceff1;
}

.multi-select-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #3d3934;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.multi-select-option:hover {
  background: #f4f0e8;
}

.multi-select-option input {
  width: 14px;
  height: 14px;
  accent-color: #1d6572;
}

.sort-field {
  width: min(220px, 100%);
}

.image-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.image-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.image-pagination[hidden] {
  display: none;
}

.image-page-info {
  color: #5b5249;
  font-size: 0.88rem;
  font-weight: 800;
}

.pagination-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.image-card {
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  text-align: left;
}

.image-card.has-open-menu {
  overflow: visible;
  z-index: 2;
}

.image-list.is-busy .image-card {
  opacity: 0.72;
  pointer-events: none;
}

.image-card-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.image-card-open:focus {
  outline: 3px solid rgba(27, 114, 128, 0.26);
  outline-offset: -3px;
}

.image-card-open:focus:not(:focus-visible) {
  outline: 0;
}

.image-card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e7e1d8;
  color: #685f55;
  font-weight: 800;
}

.image-card-preview.is-motion-media,
.collection-image-preview.is-motion-media,
.asset-preview.is-motion-media {
  background: #000000;
}

.image-card-preview img,
.image-card-preview video,
.asset-preview img,
.asset-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-card-preview.is-motion-media img,
.image-card-preview.is-motion-media video,
.collection-image-preview.is-motion-media img,
.collection-image-preview.is-motion-media video,
.asset-preview.is-motion-media img,
.asset-preview.is-motion-media video {
  object-fit: cover;
  object-position: center 70%;
  transform: scale(var(--motion-media-zoom));
  transform-origin: center 70%;
}

.image-card-body {
  padding: 8px 9px 9px;
}

.image-card-badges {
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.image-card-badges .status-pill,
.image-card-badges .vip-pill,
.image-card-badges .retry-pill {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.68rem;
}

.image-card .status-meter {
  height: 5px;
  margin-bottom: 8px;
}

.image-card-title {
  margin-bottom: 4px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.image-card-meta,
.asset-item p,
.empty-state {
  margin-bottom: 0;
  color: #665d54;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.image-card-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
}

.image-card-menu-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #171717;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.14);
}

.image-card-menu-button:hover,
.image-card-menu-button[aria-expanded="true"] {
  background: #171717;
  color: #ffffff;
}

.image-card-menu {
  position: absolute;
  top: 35px;
  right: 0;
  min-width: 138px;
  padding: 5px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(23, 23, 23, 0.18);
}

.image-card-menu[hidden] {
  display: none;
}

.danger-menu-item {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8d312b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.danger-menu-item:hover,
.danger-menu-item:focus {
  background: #f5ece9;
  outline: 0;
}

.list-message {
  margin: -6px 0 14px;
}

.list-message[hidden] {
  display: none;
}

.result-count {
  color: #5b5249;
  font-size: 0.9rem;
  font-weight: 800;
}

.placeholder-panel {
  padding: 28px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.placeholder-panel p {
  margin-bottom: 0;
  color: #5b5249;
  font-weight: 800;
}

.collection-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.collection-list-panel {
  display: grid;
  gap: 14px;
}

.collection-list {
  display: grid;
  gap: 8px;
}

.collection-card {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #171717;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.collection-card[aria-pressed="true"] {
  border-color: #1d6572;
  box-shadow: inset 0 0 0 2px rgba(29, 101, 114, 0.14);
}

.collection-card h3 {
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.collection-card p {
  margin-bottom: 8px;
  color: #665d54;
  font-size: 0.76rem;
  line-height: 1.45;
}

.collection-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.small-badge {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #ebe4d9;
  color: #594f45;
  font-size: 0.68rem;
  font-weight: 900;
}

.collection-editor-heading,
.collection-image-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.checkbox-field {
  min-height: 46px;
  display: flex;
  align-items: center;
  align-self: end;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 6px;
  background: #ffffff;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: #1d6572;
}

.collection-image-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 23, 23, 0.1);
}

.collection-image-heading h3 {
  margin-bottom: 0;
}

.collection-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.collection-image-option {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  min-height: 90px;
  padding: 8px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: #fbfaf6;
  color: #171717;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.collection-image-option[aria-pressed="true"] {
  border-color: #1d6572;
  background: #eef7f6;
  box-shadow: inset 0 0 0 2px rgba(29, 101, 114, 0.14);
}

.collection-image-preview {
  position: relative;
  width: 78px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e7e1d8;
  color: #685f55;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.collection-image-preview img,
.collection-image-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.collection-image-body h4 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.collection-image-body p {
  margin-bottom: 6px;
  color: #665d54;
  font-size: 0.72rem;
  line-height: 1.35;
}

.collection-image-marker {
  color: #1d6572;
  font-size: 0.7rem;
  font-weight: 900;
}

.agent-workflow-stats {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.agent-live-images-section {
  margin-top: 18px;
}

.agent-stats-heading,
.agent-stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-stats-heading h3 {
  margin-bottom: 0;
}

.agent-stacked-chart {
  min-height: 22px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 999px;
  background: #eee8dc;
}

.agent-chart-segment {
  min-width: 5px;
}

.agent-chart-empty {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #74695f;
  font-size: 0.78rem;
  font-weight: 800;
}

.agent-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.agent-stat-grid.is-human-backlog {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agent-stat-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: #fbfaf6;
}

.agent-stat-card-header span {
  color: #5b5249;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.agent-stat-card-header strong {
  color: #171717;
  font-size: 1.65rem;
  line-height: 1;
}

.agent-stat-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8dc;
}

.agent-stat-meter span {
  width: var(--agent-stat-width, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--agent-stat-color, #1d6572);
}

.agent-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.agent-feedback-grid {
  display: grid;
  gap: 10px;
}

.agent-feedback-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(23, 23, 23, 0.04);
}

.agent-feedback-card-header {
  display: grid;
  grid-template-columns: 26px minmax(160px, 0.85fr) minmax(420px, 2.6fr);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  cursor: pointer;
  list-style: none;
}

.agent-feedback-card-header:hover h3,
.agent-feedback-card-header:focus-visible h3 {
  color: #1d6572;
}

.agent-feedback-card-header:focus-visible {
  outline: 3px solid rgba(29, 101, 114, 0.22);
  outline-offset: 4px;
  border-radius: 6px;
}

.agent-feedback-card-header::-webkit-details-marker {
  display: none;
}

.agent-feedback-card-header::before {
  content: "+";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #1d6572;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.agent-feedback-card[open] .agent-feedback-card-header::before {
  content: "-";
}

.agent-feedback-card-header h3 {
  margin: 0;
  color: #292621;
  font-size: 1.02rem;
  line-height: 1.15;
}

.agent-feedback-overview {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.agent-feedback-overview div {
  min-width: 0;
  padding-left: 10px;
  border-left: 2px solid rgba(29, 101, 114, 0.22);
}

.agent-feedback-overview dt {
  color: #74695f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-feedback-overview dd {
  margin: 2px 0 0;
  color: #292621;
  font-size: 0.86rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-feedback-card .agent-table-shell {
  border-color: rgba(23, 23, 23, 0.08);
  background: #ffffff;
}

.agent-feedback-card:not([open]) > .agent-table-shell {
  display: none;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(23, 23, 23, 0.04);
}

.user-card-summary,
.user-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.user-card h3 {
  margin: 0;
}

.user-card p {
  margin: 5px 0 0;
  color: #74695f;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.user-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.user-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.user-details div {
  min-width: 0;
  padding-left: 10px;
  border-left: 2px solid rgba(29, 101, 114, 0.2);
}

.user-details dt {
  color: #74695f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-details dd {
  margin: 3px 0 0;
  color: #292621;
  font-size: 0.86rem;
  font-weight: 800;
}

.user-select-field {
  min-width: min(190px, 100%);
}

.purchase-settings-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(23, 23, 23, 0.06);
}

.purchase-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.purchase-settings-heading p:last-child {
  max-width: 44ch;
  margin: 0;
  color: #74695f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.purchase-price-form {
  display: grid;
  gap: 16px;
}

.price-matrix {
  display: grid;
  gap: 8px;
}

.price-matrix-head,
.price-matrix-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) repeat(2, minmax(140px, 1fr));
  gap: 10px;
  align-items: center;
}

.price-matrix-head {
  color: #74695f;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.price-matrix-row {
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 8px;
  background: rgba(244, 240, 232, 0.72);
}

.price-asset-label {
  color: #171717;
  font-weight: 900;
}

.price-input-wrap {
  position: relative;
  display: block;
  color: #74695f;
}

.price-input-wrap span {
  position: absolute;
  top: 50%;
  left: 12px;
  color: #74695f;
  font-size: 0.72rem;
  font-weight: 900;
  transform: translateY(-50%);
}

.price-input-wrap input {
  min-height: 40px;
  padding-left: 46px;
  font-weight: 850;
}

.purchase-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.purchase-form-actions .form-message {
  flex: 1;
  text-align: right;
}

.agent-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.agent-table th,
.agent-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.09);
  color: #3d3934;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.agent-table th {
  background: #f4f0e8;
  color: #5b5249;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-table tr:last-child td {
  border-bottom: 0;
}

.agent-table strong,
.agent-path,
.id-list {
  display: block;
}

.agent-path,
.id-list {
  margin-top: 5px;
  color: #74695f;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.feedback-cell {
  width: 42%;
  min-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.agent-empty-cell {
  color: #74695f;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ebe4d9;
  color: #594f45;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill-elapsed {
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.status-pill.is-live {
  background: #dbe9df;
  color: #28613b;
}

.status-pill.is-error {
  background: #f0d6d3;
  color: #8d312b;
}

.status-pill.is-running {
  background: #dceff1;
  color: #1d6572;
}

.vip-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #171717;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.retry-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(141, 79, 44, 0.18);
  background: #f6ead7;
  color: #7a4528;
  font-size: 0.78rem;
  font-weight: 900;
}

.retry-pill-marker {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(141, 79, 44, 0.14);
  font-size: 0.68rem;
  line-height: 1;
}

.status-meter {
  width: 100%;
  height: 7px;
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e2d8;
}

.status-meter span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #1d6572;
}

.status-meter.is-error span {
  background: #a33a31;
}

.empty-state {
  padding: 28px 0;
  text-align: center;
}

.form-section {
  padding: 22px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.form-section-heading {
  margin-bottom: 20px;
}

.form-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.form-section-summary::after {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid #1d6572;
  border-bottom: 2px solid #1d6572;
  content: "";
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

details.form-section[open] > .form-section-summary::after {
  transform: rotate(225deg);
}

.form-section-summary::-webkit-details-marker {
  display: none;
}

details.form-section:not([open]) > .form-section-heading {
  margin-bottom: 0;
}

.metadata-section {
  order: 1;
}

.files-section {
  order: 2;
}

.comparison-section {
  order: 3;
}

.metadata-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.metadata-summary::-webkit-details-marker {
  display: none;
}

.vip-crop-tool {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: #fbfaf6;
}

.vip-crop-tool[hidden] {
  display: none;
}

.vip-crop-help {
  margin-bottom: 0;
  color: #665d54;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.vip-crop-stage {
  position: relative;
  width: min(100%, 760px);
  overflow: hidden;
  border-radius: 8px;
  background: #111111;
  touch-action: none;
}

.vip-crop-stage[hidden] {
  display: none;
}

.vip-crop-stage video {
  width: 100%;
  height: 100%;
  display: block;
}

.vip-crop-rect {
  position: absolute;
  border: 2px solid #ffffff;
  background: rgba(29, 101, 114, 0.22);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  cursor: move;
}

.vip-crop-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #1d6572;
  cursor: nwse-resize;
}

.vip-crop-message {
  min-height: 20px;
}

.vip-crop-message.is-error {
  color: #a33a31;
}

.workflow-status {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: #fbfaf6;
}

.workflow-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-summary p {
  margin-bottom: 0;
  color: #665d54;
  font-size: 0.76rem;
  font-weight: 700;
}

.workflow-groups {
  display: grid;
  grid-template-columns: minmax(72px, 0.55fr) repeat(4, minmax(138px, 1fr)) minmax(72px, 0.55fr);
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.workflow-group {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-group.is-single {
  align-content: end;
  padding-top: 24px;
}

.workflow-group-label {
  margin: 0;
  color: #665d54;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workflow-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--workflow-step-count, 4), minmax(0, 1fr));
  gap: 5px;
  list-style: none;
}

.workflow-step {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 5px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #74695f;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  word-break: normal;
}

.workflow-step.is-complete {
  border-color: rgba(29, 101, 114, 0.2);
  background: #e5f0ef;
  color: #1d6572;
}

.workflow-step.is-current {
  border-color: #1d6572;
  background: #1d6572;
  color: #ffffff;
}

.workflow-step.is-paused {
  border-color: rgba(163, 58, 49, 0.18);
  background: #f5ece9;
  color: #8d312b;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.full-field {
  width: 100%;
}

.details-review {
  margin-top: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(29, 101, 114, 0.18);
  border-radius: 8px;
  background: #eef7f6;
}

.details-review[hidden] {
  display: none;
}

.details-review p {
  margin-bottom: 0;
  color: #234f58;
  font-weight: 800;
}

.stage-review {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: #fbfaf6;
}

.stage-review[hidden] {
  display: none;
}

.review-heading,
.review-actions,
.review-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.review-heading {
  margin-bottom: 14px;
}

.review-heading h3,
.review-dialog h2 {
  margin-bottom: 0;
}

.review-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.review-compare article {
  min-width: 0;
}

.review-compare h4 {
  margin: 0 0 8px;
  color: #3d3934;
  font-size: 0.95rem;
}

.review-preview {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #e7e1d8;
  color: #685f55;
  font-weight: 800;
  text-align: center;
}

.review-preview.has-pending-rotation,
.asset-preview.has-pending-rotation {
  outline: 2px solid #1d6572;
  outline-offset: -2px;
}

.review-preview.has-pending-rotation::after,
.asset-preview.has-pending-rotation::after {
  content: attr(data-preview-state);
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(29, 101, 114, 0.92);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(23, 23, 23, 0.16);
}

.asset-preview.has-pending-rotation::after {
  top: 5px;
  right: 5px;
  padding: 4px 6px;
  font-size: 0.62rem;
}

.review-preview a,
.review-preview img,
.review-preview video {
  width: 100%;
  height: 100%;
  display: block;
}

.review-preview img,
.review-preview video {
  object-fit: contain;
}

.video-preview-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.video-preview-shell video {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.media-fallback-link {
  width: auto;
  height: auto;
  display: block;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.clip-compare {
  margin-bottom: 0;
}

.single-clip-compare {
  grid-template-columns: minmax(0, 1fr);
}

.clip-preview {
  min-height: 440px;
  background: #171717;
  color: #f6f4ef;
}

.review-actions {
  justify-content: flex-end;
}

.comparison-stack {
  display: grid;
  gap: 18px;
}

.comparison-block {
  min-width: 0;
}

.comparison-block + .comparison-block {
  padding-top: 18px;
  border-top: 1px solid rgba(23, 23, 23, 0.1);
}

.comparison-heading {
  margin-bottom: 12px;
}

.comparison-compare {
  margin-bottom: 0;
}

.comparison-section .review-preview {
  min-height: 260px;
}

.review-dialog {
  width: min(100vw - 40px, 1320px);
  max-height: calc(100vh - 40px);
  padding: 18px;
  border: 0;
  border-radius: 8px;
  background: #f6f4ef;
  color: #171717;
}

.review-dialog::backdrop {
  background: rgba(23, 23, 23, 0.68);
}

.review-dialog header {
  margin-bottom: 16px;
}

.dialog-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoom-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 6px;
  background: #ffffff;
}

.zoom-controls button {
  min-width: 44px;
  min-height: 36px;
  border: 0;
  border-right: 1px solid rgba(23, 23, 23, 0.12);
  background: transparent;
  color: #3d3934;
  cursor: pointer;
  font-weight: 800;
}

.zoom-controls button:last-child {
  border-right: 0;
}

.zoom-controls button[aria-pressed="true"] {
  background: #1d6572;
  color: #ffffff;
}

.fullscreen-compare {
  margin-bottom: 0;
}

.fullscreen-compare .review-preview {
  height: min(72vh, 780px);
  cursor: zoom-in;
}

.fullscreen-compare .review-preview.is-zooming {
  cursor: zoom-out;
}

.fullscreen-compare .review-preview img,
.fullscreen-compare .review-preview video {
  transition: transform 80ms ease-out;
  will-change: transform;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(23, 23, 23, 0.11);
  border-radius: 8px;
  background: #fbfaf6;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.asset-item[hidden],
.analysis-context-field[hidden],
.workflow-actions[hidden] {
  display: none;
}

.asset-item.is-drop-target {
  border-color: #1d6572;
  background: #eef7f6;
  box-shadow: inset 0 0 0 2px rgba(29, 101, 114, 0.14);
}

.asset-item.is-busy {
  opacity: 0.72;
}

.asset-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.asset-item h3 {
  margin-bottom: 3px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.asset-item p {
  font-size: 0.68rem;
  line-height: 1.25;
}

.asset-delete-button {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(141, 49, 43, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #8d312b;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.asset-delete-button[hidden] {
  display: none;
}

.asset-delete-button:hover,
.asset-delete-button:focus {
  background: #f5ece9;
  outline: 0;
}

.asset-delete-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.asset-item input,
.asset-item progress {
  grid-column: 1 / -1;
}

.asset-item input[type="file"] {
  min-height: 34px;
  padding: 8px;
  font-size: 0.72rem;
}

.asset-preview {
  position: relative;
  width: 96px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e7e1d8;
  color: #685f55;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.asset-preview a {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
}

progress {
  width: 100%;
  height: 6px;
  accent-color: #1d6572;
}

.analysis-context-field {
  margin-top: 16px;
}

.workflow-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

body.is-dark-theme {
  background:
    linear-gradient(140deg, rgba(45, 127, 132, 0.16), transparent 38%),
    linear-gradient(320deg, rgba(132, 71, 62, 0.15), transparent 36%),
    #111412;
  color: #f2f0ea;
}

body.is-dark-theme .login-panel,
body.is-dark-theme .account-panel,
body.is-dark-theme .placeholder-panel,
body.is-dark-theme .section-tabs,
body.is-dark-theme .image-card,
body.is-dark-theme .collection-card,
body.is-dark-theme .collection-image-option,
body.is-dark-theme .agent-workflow-stats,
body.is-dark-theme .agent-stat-card,
body.is-dark-theme .agent-feedback-card,
body.is-dark-theme .agent-table-shell,
body.is-dark-theme .user-card,
body.is-dark-theme .purchase-settings-card,
body.is-dark-theme .form-section,
body.is-dark-theme .vip-crop-tool,
body.is-dark-theme .workflow-status,
body.is-dark-theme .workflow-group,
body.is-dark-theme .details-review,
body.is-dark-theme .stage-review,
body.is-dark-theme .asset-item,
body.is-dark-theme .review-dialog {
  border-color: rgba(242, 240, 234, 0.12);
  background: rgba(27, 32, 30, 0.9);
  color: #f2f0ea;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

body.is-dark-theme .account-panel {
  background: rgba(24, 28, 26, 0.97);
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.44);
}

body.is-dark-theme h1,
body.is-dark-theme h2,
body.is-dark-theme h3,
body.is-dark-theme h4,
body.is-dark-theme label,
body.is-dark-theme .search-field,
body.is-dark-theme .select-field,
body.is-dark-theme .readonly-field,
body.is-dark-theme .multi-select-field,
body.is-dark-theme .collection-card,
body.is-dark-theme .collection-image-option,
body.is-dark-theme .agent-stat-card-header strong,
body.is-dark-theme .agent-feedback-card-header h3,
body.is-dark-theme .agent-feedback-overview dd,
body.is-dark-theme .agent-table td,
body.is-dark-theme .user-details dd,
body.is-dark-theme .price-asset-label,
body.is-dark-theme .review-compare h4,
body.is-dark-theme .image-card-title,
body.is-dark-theme .collection-image-body h4 {
  color: #f2f0ea;
}

body.is-dark-theme .brand-lockup p,
body.is-dark-theme .app-header p,
body.is-dark-theme .eyebrow,
body.is-dark-theme .connection-status,
body.is-dark-theme .result-count,
body.is-dark-theme .image-page-info,
body.is-dark-theme .image-card-meta,
body.is-dark-theme .asset-item p,
body.is-dark-theme .empty-state,
body.is-dark-theme .placeholder-panel p,
body.is-dark-theme .collection-card p,
body.is-dark-theme .collection-image-body p,
body.is-dark-theme .agent-stat-card-header span,
body.is-dark-theme .agent-feedback-overview dt,
body.is-dark-theme .user-card p,
body.is-dark-theme .user-details dt,
body.is-dark-theme .purchase-settings-heading p:last-child,
body.is-dark-theme .price-matrix-head,
body.is-dark-theme .price-input-wrap,
body.is-dark-theme .price-input-wrap span,
body.is-dark-theme .agent-path,
body.is-dark-theme .id-list,
body.is-dark-theme .agent-empty-cell,
body.is-dark-theme .workflow-summary p,
body.is-dark-theme .workflow-group-label,
body.is-dark-theme .vip-crop-help {
  color: #b8b4ab;
}

body.is-dark-theme input,
body.is-dark-theme select,
body.is-dark-theme textarea,
body.is-dark-theme .readonly-field output,
body.is-dark-theme .checkbox-field,
body.is-dark-theme .multi-select-button,
body.is-dark-theme .multi-select-panel,
body.is-dark-theme .zoom-controls {
  border-color: rgba(242, 240, 234, 0.16);
  background: #1b201e;
  color: #f2f0ea;
}

body.is-dark-theme input[type="file"] {
  background: #222825;
}

body.is-dark-theme input:focus,
body.is-dark-theme select:focus,
body.is-dark-theme textarea:focus {
  border-color: #4aa0a8;
  outline-color: rgba(74, 160, 168, 0.22);
}

body.is-dark-theme .price-matrix-row {
  border-color: rgba(242, 240, 234, 0.1);
  background: rgba(242, 240, 234, 0.06);
}

body.is-dark-theme .secondary-button {
  background: #f2f0ea;
  color: #151817;
}

body.is-dark-theme .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.is-dark-theme .theme-toggle[aria-pressed="true"] {
  background: #1d6572;
  color: #ffffff;
}

body.is-dark-theme .section-tab {
  color: #d6d2ca;
}

body.is-dark-theme .section-tab[aria-pressed="true"] {
  background: #f2f0ea;
  color: #151817;
}

body.is-dark-theme .multi-select-presets,
body.is-dark-theme .collection-image-section,
body.is-dark-theme .comparison-block + .comparison-block,
body.is-dark-theme .rating-section {
  border-color: rgba(242, 240, 234, 0.12);
}

body.is-dark-theme .multi-select-presets button,
body.is-dark-theme .details-review,
body.is-dark-theme .collection-image-option[aria-pressed="true"],
body.is-dark-theme .asset-item.is-drop-target {
  border-color: rgba(74, 160, 168, 0.24);
  background: rgba(74, 160, 168, 0.14);
  color: #7bd1d7;
}

body.is-dark-theme .multi-select-option {
  color: #d6d2ca;
}

body.is-dark-theme .multi-select-option:hover {
  background: #222825;
}

body.is-dark-theme .image-card-preview,
body.is-dark-theme .collection-image-preview,
body.is-dark-theme .asset-preview,
body.is-dark-theme .review-preview,
body.is-dark-theme .workflow-step,
body.is-dark-theme .collection-mosaic-item,
body.is-dark-theme .collection-mosaic-placeholder {
  background: #232a27;
  color: #aeb8b2;
}

body.is-dark-theme .review-preview.has-pending-rotation,
body.is-dark-theme .asset-preview.has-pending-rotation {
  outline-color: #7bd1d7;
}

body.is-dark-theme .review-preview.has-pending-rotation::after,
body.is-dark-theme .asset-preview.has-pending-rotation::after {
  background: rgba(74, 160, 168, 0.92);
  color: #151817;
}

body.is-dark-theme .image-card-menu,
body.is-dark-theme .agent-feedback-card .agent-table-shell {
  border-color: rgba(242, 240, 234, 0.12);
  background: #1b201e;
}

body.is-dark-theme .image-card-menu-button,
body.is-dark-theme .asset-delete-button {
  border-color: rgba(242, 240, 234, 0.16);
  background: rgba(27, 32, 30, 0.94);
  color: #f2f0ea;
}

body.is-dark-theme .image-card-menu-button:hover,
body.is-dark-theme .image-card-menu-button[aria-expanded="true"] {
  background: #f2f0ea;
  color: #151817;
}

body.is-dark-theme .danger-menu-item:hover,
body.is-dark-theme .danger-menu-item:focus,
body.is-dark-theme .asset-delete-button:hover,
body.is-dark-theme .asset-delete-button:focus,
body.is-dark-theme .workflow-step.is-paused {
  background: rgba(163, 58, 49, 0.18);
}

body.is-dark-theme .small-badge,
body.is-dark-theme .status-pill {
  background: rgba(242, 240, 234, 0.1);
  color: #d6d2ca;
}

body.is-dark-theme .status-pill.is-live {
  background: rgba(63, 108, 78, 0.22);
  color: #9dd1aa;
}

body.is-dark-theme .status-pill.is-error {
  background: rgba(163, 58, 49, 0.2);
  color: #e1a29b;
}

body.is-dark-theme .status-pill.is-running,
body.is-dark-theme .workflow-step.is-complete {
  background: rgba(74, 160, 168, 0.16);
  color: #7bd1d7;
}

body.is-dark-theme .retry-pill {
  border-color: rgba(242, 176, 119, 0.18);
  background: rgba(177, 108, 60, 0.18);
  color: #f2c08e;
}

body.is-dark-theme .retry-pill-marker {
  background: rgba(242, 176, 119, 0.16);
}

body.is-dark-theme .workflow-step {
  border-color: rgba(242, 240, 234, 0.12);
}

body.is-dark-theme .workflow-step.is-current {
  border-color: #4aa0a8;
  background: #1d6572;
  color: #ffffff;
}

body.is-dark-theme .status-meter,
body.is-dark-theme .agent-stat-meter,
body.is-dark-theme .agent-stacked-chart {
  border-color: rgba(242, 240, 234, 0.1);
  background: #222825;
}

body.is-dark-theme .agent-table th {
  background: #222825;
  color: #d6d2ca;
}

body.is-dark-theme .agent-table th,
body.is-dark-theme .agent-table td {
  border-bottom-color: rgba(242, 240, 234, 0.1);
}

body.is-dark-theme .zoom-controls button {
  border-right-color: rgba(242, 240, 234, 0.12);
  color: #f2f0ea;
}

body.is-dark-theme .zoom-controls button[aria-pressed="true"] {
  background: #1d6572;
  color: #ffffff;
}

body.is-dark-theme .review-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

@media (max-width: 960px) {
  .image-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-grid,
  .collection-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-layout {
    grid-template-columns: 1fr;
  }

  .review-compare {
    grid-template-columns: 1fr;
  }

  .comparison-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .agent-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-stat-grid.is-human-backlog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-matrix-head,
  .price-matrix-row {
    grid-template-columns: minmax(96px, 0.65fr) repeat(2, minmax(120px, 1fr));
  }

  .user-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-shell {
    width: min(100% - 24px, 1180px);
    place-items: start center;
    padding: 24px 0;
  }

  .app-header,
  .section-switcher,
  .view-toolbar,
  .filter-bar,
  .detail-actions,
  .header-actions,
  .section-tabs,
  .collection-editor-heading,
  .collection-image-heading,
  .dialog-tools,
  .details-review,
  .review-heading,
  .purchase-settings-heading,
  .purchase-form-actions,
  .review-actions,
  .review-dialog header {
    align-items: stretch;
    flex-direction: column;
  }

  .connection-status,
  .save-message {
    min-width: 0;
    text-align: left;
  }

  .agent-stats-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-card-summary,
  .user-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .user-badges {
    justify-content: flex-start;
  }

  .backlog-sync-message {
    margin-top: -6px;
    text-align: left;
  }

  .image-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .image-page-info {
    text-align: center;
  }

  .select-field,
  .multi-select-field,
  .image-card,
  .section-tabs,
  .section-tab,
  .secondary-button,
  .primary-button {
    width: 100%;
  }

  .multi-select-panel {
    width: 100%;
  }

  .multi-select-options,
  .multi-select-presets {
    grid-template-columns: 1fr;
  }

  .result-count {
    align-self: flex-start;
  }

  .field-grid,
  .collection-image-grid,
  .comparison-compare,
  .price-matrix-head,
  .price-matrix-row,
  .agent-stat-grid,
  .agent-stat-grid.is-human-backlog,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .price-matrix-head {
    display: none;
  }

  .purchase-form-actions .form-message {
    text-align: left;
  }

  .image-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-image-option {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .collection-image-preview {
    width: 82px;
  }

  .dashboard.is-new-image-view #signOutButton,
  .detail-view.is-new-image #backToListButton {
    display: none;
  }

  .metadata-section {
    order: 2;
  }

  .files-section {
    order: 1;
  }

  .metadata-summary {
    align-items: flex-start;
  }

  .workflow-status {
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
  }

  .workflow-summary {
    align-items: flex-start;
  }

  .workflow-summary p {
    font-size: 0.76rem;
  }

  .workflow-groups {
    grid-template-columns: 76px repeat(4, minmax(164px, 1fr)) 76px;
  }

  .workflow-steps {
    display: grid;
    grid-template-columns: repeat(var(--workflow-step-count, 4), minmax(0, 1fr));
    gap: 6px;
    padding-bottom: 2px;
  }

  .workflow-step {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 0.66rem;
  }

  .form-section,
  .login-panel {
    padding: 18px;
  }

  .asset-item {
    grid-template-columns: 1fr;
  }

  .asset-preview {
    width: 100%;
  }

  .review-preview {
    min-height: 220px;
  }

  .clip-preview {
    min-height: 280px;
  }
}

@media (max-width: 430px) {
  .image-list,
  .asset-grid {
    grid-template-columns: 1fr;
  }
}
