:root {
  --ink: #111111;
  --paper: #fffdf5;
  --canvas: #f2ecdf;
  --canvas-alt: #efe7d7;
  --blue: #0b63ff;
  --red: #ff4f32;
  --yellow: #ffd63b;
  --green: #16c172;
  --rose-soft: #ffd8d4;
  --amber-soft: #ffecc2;
  --green-soft: #d8ffea;
  --shadow: 6px 6px 0 var(--ink);
  --border: 3px solid var(--ink);
}

html.theme-dark {
  color-scheme: dark;
  --ink: #f6f0df;
  --paper: #1f1b17;
  --canvas: #0f1011;
  --canvas-alt: #171819;
  --blue: #5f97ff;
  --red: #ff6d52;
  --yellow: #ffd63b;
  --green: #39d58e;
  --rose-soft: #5f2e2a;
  --amber-soft: #5b4215;
  --green-soft: #1d5738;
  --shadow: 6px 6px 0 #000000;
  --border: 3px solid #f6f0df;
}

* {
  box-sizing: border-box;
}

body.theme-brutalist,
body.theme-brutalist-login {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.01em;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 214, 59, 0.45) 0 16%, transparent 16.5%),
    radial-gradient(circle at 86% 10%, rgba(11, 99, 255, 0.26) 0 12%, transparent 12.5%),
    repeating-linear-gradient(
      -35deg,
      var(--canvas) 0,
      var(--canvas) 14px,
      var(--canvas-alt) 14px,
      var(--canvas-alt) 28px
    );
}

body.theme-brutalist {
  display: flex;
  flex-direction: column;
}

body.theme-brutalist main {
  flex: 1 0 auto;
}

body.theme-brutalist h1,
body.theme-brutalist h2,
body.theme-brutalist h3,
body.theme-brutalist h4,
body.theme-brutalist-login h1 {
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.theme-brutalist header {
  border-bottom: var(--border);
  background: rgba(255, 253, 245, 0.95);
  backdrop-filter: blur(4px);
}

body.theme-brutalist main,
body.theme-brutalist header > div {
  width: 100%;
  max-width: 72rem;
}

body.theme-brutalist footer {
  width: 100%;
  max-width: 72rem;
}

body.theme-brutalist .header-top-row {
  min-width: 0;
  gap: 0.45rem;
}

body.theme-brutalist .app-title {
  min-width: 0;
  line-height: 1.05;
}

body.theme-brutalist .header-actions {
  margin-left: auto;
  min-width: 0;
  gap: 0.4rem;
}

body.theme-brutalist .env-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--red);
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.theme-brutalist .actor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 10rem;
  overflow: hidden;
  white-space: nowrap;
}

body.theme-brutalist .rounded,
body.theme-brutalist .rounded-lg,
body.theme-brutalist .rounded-xl,
body.theme-brutalist .rounded-2xl,
body.theme-brutalist-login .rounded,
body.theme-brutalist-login .rounded-lg,
body.theme-brutalist-login .rounded-xl,
body.theme-brutalist-login .rounded-2xl {
  border-radius: 0 !important;
}

body.theme-brutalist button,
body.theme-brutalist a[class],
body.theme-brutalist-login button,
body.theme-brutalist-login a[class] {
  border: var(--border) !important;
  box-shadow: 4px 4px 0 var(--ink);
  border-radius: 0 !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

body.theme-brutalist button:hover,
body.theme-brutalist a[class]:hover,
body.theme-brutalist-login button:hover,
body.theme-brutalist-login a[class]:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

body.theme-brutalist button:active,
body.theme-brutalist a[class]:active,
body.theme-brutalist-login button:active,
body.theme-brutalist-login a[class]:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

body.theme-brutalist button.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

body.theme-brutalist button.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.45rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  vertical-align: -0.1rem;
  animation: btn-spin 700ms linear infinite;
}

body.theme-brutalist button.is-loading:hover,
body.theme-brutalist button.is-loading:active {
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

@keyframes btn-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

body.theme-brutalist input,
body.theme-brutalist textarea,
body.theme-brutalist select,
body.theme-brutalist-login input,
body.theme-brutalist-login textarea,
body.theme-brutalist-login select {
  border: var(--border) !important;
  border-radius: 0 !important;
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
  font-family: "Space Grotesk", sans-serif;
}

body.theme-brutalist input:focus,
body.theme-brutalist textarea:focus,
body.theme-brutalist select:focus,
body.theme-brutalist-login input:focus,
body.theme-brutalist-login textarea:focus,
body.theme-brutalist-login select:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}

body.theme-brutalist .field-label,
body.theme-brutalist-login .field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.theme-brutalist .field-required-dot,
body.theme-brutalist-login .field-required-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  flex: 0 0 auto;
}

body.theme-brutalist .field-label-required .field-required-dot,
body.theme-brutalist-login .field-label-required .field-required-dot {
  margin-left: 0.1rem;
}

body.theme-brutalist .form-error-box,
body.theme-brutalist-login .form-error-box {
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--rose-soft);
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
}

body.theme-brutalist [data-field-wrap].field-has-error .field-label,
body.theme-brutalist-login [data-field-wrap].field-has-error .field-label {
  color: var(--red);
}

body.theme-brutalist [data-field-wrap].field-has-error[data-images-field],
body.theme-brutalist-login [data-field-wrap].field-has-error[data-images-field] {
  border-color: var(--red) !important;
  box-shadow: inset 0 0 0 2px var(--red);
}

body.theme-brutalist input.is-invalid,
body.theme-brutalist textarea.is-invalid,
body.theme-brutalist select.is-invalid,
body.theme-brutalist-login input.is-invalid,
body.theme-brutalist-login textarea.is-invalid,
body.theme-brutalist-login select.is-invalid {
  outline: 3px solid var(--red);
  outline-offset: 1px;
  background: #fff3f1;
}

body.theme-brutalist section[class*="bg-white"],
body.theme-brutalist [data-item-id],
body.theme-brutalist .adjust-sheet-shell,
body.theme-brutalist #actor-modal > div,
body.theme-brutalist-login .login-shell {
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--paper);
}

body.theme-brutalist .tab-trigger {
  width: 100%;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  background: #ffffff;
  color: var(--ink);
}

body.theme-brutalist .theme-toggle {
  width: 2.6rem;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0.4rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.theme-brutalist .theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.theme-brutalist .tab-trigger-active {
  background: var(--red) !important;
  color: #111 !important;
}

body.theme-brutalist .tab-trigger-inactive {
  background: #ffffff !important;
  color: #111 !important;
}

body.theme-brutalist .status-banner {
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

body.theme-brutalist .status-banner--ok {
  background: var(--green);
  color: var(--ink);
}

body.theme-brutalist .status-banner--warn {
  background: var(--red);
  color: #111;
}

body.theme-brutalist .status-banner__reset {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit;
  text-decoration: underline;
  font-size: 0.75rem;
  padding: 0;
}

body.theme-brutalist .status-chip {
  border: 2px solid var(--ink);
  background: var(--yellow);
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.theme-brutalist .bg-slate-900,
body.theme-brutalist .bg-slate-800 {
  background: var(--blue) !important;
  color: #ffffff !important;
}

body.theme-brutalist .bg-emerald-600 {
  background: var(--green) !important;
  color: var(--ink) !important;
}

body.theme-brutalist .bg-rose-600 {
  background: var(--red) !important;
  color: #ffffff !important;
}

body.theme-brutalist .bg-slate-200,
body.theme-brutalist .bg-slate-100 {
  background: #ffffff !important;
  color: var(--ink) !important;
}

body.theme-brutalist .bg-rose-50 {
  background: var(--rose-soft) !important;
}

body.theme-brutalist .bg-amber-50 {
  background: var(--amber-soft) !important;
}

body.theme-brutalist .bg-emerald-50 {
  background: var(--green-soft) !important;
}

body.theme-brutalist .text-slate-600,
body.theme-brutalist .text-slate-500 {
  color: #343434 !important;
}

body.theme-brutalist #actor-label {
  display: inline-block;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
}

body.theme-brutalist .logout-btn {
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

body.theme-brutalist #capture-section {
  display: none;
}

body.theme-brutalist #capture-locked-hint {
  display: block;
}

html.has-location body.theme-brutalist #capture-section {
  display: block;
}

html.has-location body.theme-brutalist #capture-locked-hint {
  display: none;
}

body.theme-brutalist .capture-lock-note {
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--red);
  color: #ffffff;
}

body.theme-brutalist .capture-lock-note p {
  margin: 0;
  letter-spacing: 0.02em;
}

body.theme-brutalist.modal-open {
  overflow: hidden;
}

body.theme-brutalist.adjust-open {
  overflow: hidden;
}

body.theme-brutalist.image-preview-open {
  overflow: hidden;
}

body.theme-brutalist #manage-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 0.75rem;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(17, 17, 17, 0.56);
}

body.theme-brutalist #manage-sheet.hidden {
  display: none;
}

body.theme-brutalist .manage-sheet-shell {
  width: min(100%, 58rem);
  height: 100%;
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.theme-brutalist .manage-sheet-header {
  border-bottom: var(--border);
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

body.theme-brutalist .manage-sheet-content {
  flex: 1;
  overflow: auto;
  padding: 0.6rem;
}

body.theme-brutalist .manage-sheet-content > [data-item-id] {
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

body.theme-brutalist .manage-card__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.theme-brutalist .manage-main-grid,
body.theme-brutalist .manage-dim-grid,
body.theme-brutalist .manage-image-grid {
  min-width: 0;
}

body.theme-brutalist .manage-existing-image {
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: #ffffff;
}

body.theme-brutalist .manage-image-preview {
  width: 100%;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 500 !important;
  text-align: left;
}

body.theme-brutalist .manage-image-preview:hover,
body.theme-brutalist .manage-image-preview:active {
  transform: none !important;
  box-shadow: none !important;
}

body.theme-brutalist .manage-image-preview img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
}

body.theme-brutalist .manage-image-hint {
  display: block;
  text-align: center;
  font-size: 0.72rem;
}

body.theme-brutalist #image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(7, 7, 7, 0.88);
}

body.theme-brutalist #image-lightbox.hidden {
  display: none;
}

body.theme-brutalist .image-lightbox-shell {
  width: min(100%, 58rem);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

body.theme-brutalist .image-lightbox-toolbar {
  display: flex;
  justify-content: flex-end;
}

body.theme-brutalist .image-lightbox-frame {
  border: var(--border);
  box-shadow: var(--shadow);
  background: #080808;
  padding: 0.45rem;
  min-height: 14rem;
  display: grid;
  place-items: center;
}

body.theme-brutalist .image-lightbox-img {
  max-width: 100%;
  max-height: min(78vh, 46rem);
  object-fit: contain;
}

body.theme-brutalist #adjust-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(17, 17, 17, 0.48);
}

body.theme-brutalist #adjust-sheet.hidden {
  display: none;
}

body.theme-brutalist .adjust-sheet-shell {
  width: min(100%, 42rem);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.theme-brutalist .adjust-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: var(--border);
  padding: 0.65rem 0.75rem;
}

body.theme-brutalist .adjust-sheet-body {
  padding: 0.75rem;
  overflow: auto;
}

body.theme-brutalist .adjust-sheet-body #adjust-image {
  margin: 0 auto;
}

body.theme-brutalist .adjust-stepper button,
body.theme-brutalist .adjust-presets button {
  width: 100%;
}

body.theme-brutalist #image-preview-list > div {
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: #ffffff;
}

body.theme-brutalist .config-list-row {
  display: flex;
  gap: 0.5rem;
}

body.theme-brutalist .config-list-row > input {
  flex: 1;
}

body.theme-brutalist .config-list-row > button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

body.theme-brutalist .category-multi-helper {
  border-left: 3px solid var(--ink);
  padding-left: 0.6rem;
}

body.theme-brutalist .category-multi-helper button {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem !important;
}

body.theme-brutalist .category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

body.theme-brutalist .category-chip {
  border: 2px solid var(--ink);
  background: #ffffff;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
}

body.theme-brutalist .overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  position: relative;
  z-index: 2;
}

body.theme-brutalist .overview-stat-tile {
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: #ffffff;
  padding: 0.45rem 0.5rem;
}

body.theme-brutalist .overview-stat-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #343434;
}

body.theme-brutalist .overview-stat-value {
  margin: 0.08rem 0 0;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1;
}

body.theme-brutalist .overview-filters {
  border-left: 3px solid var(--ink);
  padding-left: 0.5rem;
  position: relative;
  z-index: 1;
}

body.theme-brutalist .overview-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body.theme-brutalist .overview-chip {
  padding: 0.3rem 0.6rem !important;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  touch-action: manipulation;
}

body.theme-brutalist .overview-chip-active {
  background: var(--yellow) !important;
  color: #111 !important;
}

body.theme-brutalist .overview-chip:hover,
body.theme-brutalist .overview-chip:active,
body.theme-brutalist .overview-chip:focus-visible {
  transform: none !important;
  box-shadow: 4px 4px 0 var(--ink) !important;
}

body.theme-brutalist .overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  align-items: stretch;
}

body.theme-brutalist .overview-empty-state {
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  background: #ffffff;
  padding: 0.75rem;
  text-align: center;
  font-weight: 700;
}

body.theme-brutalist .overview-card-hidden {
  display: none !important;
}

body.theme-brutalist .item-card--overview {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem !important;
}

body.theme-brutalist .item-card-overview-media {
  position: relative;
}

body.theme-brutalist .item-card__image-button {
  width: 100%;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

body.theme-brutalist .item-card__image-button:hover,
body.theme-brutalist .item-card__image-button:active {
  transform: none !important;
  box-shadow: none !important;
}

body.theme-brutalist .item-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: #ffffff;
}

body.theme-brutalist .item-card__image--empty {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #444;
}

body.theme-brutalist .item-status-pill {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--yellow);
  color: #111;
  padding: 0.1rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.theme-brutalist .item-card__content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.theme-brutalist .item-card__title {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.theme-brutalist .item-card__version {
  border: 2px solid var(--ink);
  background: #ffffff;
  padding: 0.05rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
}

body.theme-brutalist .item-card__quantity {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
}

body.theme-brutalist .item-card__meta {
  margin: 0.05rem 0 0;
  font-size: 0.7rem;
  color: #3c3c3c;
}

body.theme-brutalist .item-card__chips {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

body.theme-brutalist .item-card__chip {
  border: 2px solid var(--ink);
  background: #ffffff;
  padding: 0.05rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
}

body.theme-brutalist [data-tab-content] > section,
body.theme-brutalist #recent-items > [data-item-id],
body.theme-brutalist #search-results [data-item-id] {
  animation: panel-enter 280ms ease-out both;
}

body.theme-brutalist .item-success-flash {
  animation: item-success-pulse 760ms ease-out;
}

@keyframes item-success-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 193, 114, 0.85), var(--shadow);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(22, 193, 114, 0), var(--shadow);
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(-0.4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

body.theme-brutalist-login .login-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

body.theme-brutalist-login .login-shell {
  width: 100%;
  max-width: 26rem;
  padding: 1.4rem;
}

body.theme-brutalist-login .error-box {
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--rose-soft);
  color: var(--ink);
}

html.theme-dark body.theme-brutalist,
html.theme-dark body.theme-brutalist-login {
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 214, 59, 0.16) 0 15%, transparent 15.5%),
    radial-gradient(circle at 86% 10%, rgba(95, 151, 255, 0.2) 0 12%, transparent 12.5%),
    repeating-linear-gradient(
      -35deg,
      var(--canvas) 0,
      var(--canvas) 14px,
      var(--canvas-alt) 14px,
      var(--canvas-alt) 28px
    );
}

html.theme-dark body.theme-brutalist header {
  background: rgba(18, 18, 19, 0.94);
}

html.theme-dark body.theme-brutalist input,
html.theme-dark body.theme-brutalist textarea,
html.theme-dark body.theme-brutalist select,
html.theme-dark body.theme-brutalist-login input,
html.theme-dark body.theme-brutalist-login textarea,
html.theme-dark body.theme-brutalist-login select {
  background: #151516;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(246, 240, 223, 0.15);
}

html.theme-dark body.theme-brutalist input::placeholder,
html.theme-dark body.theme-brutalist textarea::placeholder,
html.theme-dark body.theme-brutalist-login input::placeholder,
html.theme-dark body.theme-brutalist-login textarea::placeholder {
  color: rgba(246, 240, 223, 0.65);
}

html.theme-dark body.theme-brutalist .theme-toggle,
html.theme-dark body.theme-brutalist .bg-slate-200,
html.theme-dark body.theme-brutalist .bg-slate-100 {
  background: #262629 !important;
  color: var(--ink) !important;
}

html.theme-dark body.theme-brutalist .tab-trigger-inactive {
  background: #1a1a1d !important;
  color: var(--ink) !important;
}

html.theme-dark body.theme-brutalist .tab-trigger-active {
  color: #141414 !important;
}

html.theme-dark body.theme-brutalist .text-slate-600,
html.theme-dark body.theme-brutalist .text-slate-500,
html.theme-dark body.theme-brutalist-login .text-slate-600,
html.theme-dark body.theme-brutalist-login .text-slate-500 {
  color: #ded3bf !important;
}

html.theme-dark body.theme-brutalist #image-preview-list > div {
  background: #18181a;
}

html.theme-dark body.theme-brutalist .overview-stat-tile,
html.theme-dark body.theme-brutalist .overview-empty-state,
html.theme-dark body.theme-brutalist .item-card__image,
html.theme-dark body.theme-brutalist .item-card__version,
html.theme-dark body.theme-brutalist .item-card__chip {
  background: #18181a;
}

html.theme-dark body.theme-brutalist .item-card__image--empty {
  color: #d9cfbc;
}

html.theme-dark body.theme-brutalist .manage-existing-image {
  background: #18181a;
}

html.theme-dark body.theme-brutalist .image-lightbox-frame {
  background: #08090a;
}

html.theme-dark body.theme-brutalist .form-error-box,
html.theme-dark body.theme-brutalist-login .form-error-box {
  background: #5f2e2a;
  color: #f6f0df;
}

html.theme-dark body.theme-brutalist input.is-invalid,
html.theme-dark body.theme-brutalist textarea.is-invalid,
html.theme-dark body.theme-brutalist select.is-invalid,
html.theme-dark body.theme-brutalist-login input.is-invalid,
html.theme-dark body.theme-brutalist-login textarea.is-invalid,
html.theme-dark body.theme-brutalist-login select.is-invalid {
  background: #3a1d1a;
}

html.theme-dark body.theme-brutalist .status-chip {
  color: #111;
}

html.theme-dark body.theme-brutalist .status-banner--warn {
  background: #8b2e22;
  color: #fdf6e8;
}

@media (min-width: 440px) {
  body.theme-brutalist .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  body.theme-brutalist .overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.theme-brutalist .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  body.theme-brutalist nav[aria-label="Hauptnavigation"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.theme-brutalist button,
  body.theme-brutalist a[class] {
    font-size: 0.76rem;
  }
}

@media (max-width: 640px) {
  body.theme-brutalist main {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  body.theme-brutalist header > div {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  body.theme-brutalist #tab-configuration > section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body.theme-brutalist .header-actions {
    gap: 0.3rem;
  }

  body.theme-brutalist .app-title {
    font-size: 0.92rem;
    letter-spacing: 0.01em;
  }

  body.theme-brutalist .actor-chip {
    max-width: 5.8rem;
    padding: 0.35rem 0.4rem !important;
    font-size: 0.72rem;
  }

  body.theme-brutalist #actor-label {
    max-width: 3.2rem;
  }

  body.theme-brutalist .logout-btn {
    min-width: 2.5rem;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.72rem;
  }

  body.theme-brutalist #tab-configuration .config-create-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  body.theme-brutalist #tab-configuration .config-create-row > button {
    width: 100%;
  }

  body.theme-brutalist #tab-configuration .config-list-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  body.theme-brutalist #tab-configuration .config-list-row > input {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.theme-brutalist #tab-configuration .config-list-row > button {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.35rem !important;
    font-size: 0.64rem;
    letter-spacing: 0.01em;
  }

  body.theme-brutalist #manage-sheet {
    padding: 0;
  }

  body.theme-brutalist .manage-sheet-shell {
    width: 100%;
    max-width: none;
    height: 100%;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
  }

  body.theme-brutalist .manage-sheet-header {
    padding: 0.5rem;
  }

  body.theme-brutalist .manage-sheet-content {
    padding: 0.45rem;
  }

  body.theme-brutalist .manage-card__top {
    display: block;
  }

  body.theme-brutalist .manage-card__actions {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  body.theme-brutalist .manage-card__actions > button {
    width: 100%;
  }

  body.theme-brutalist .manage-main-grid {
    grid-template-columns: 1fr !important;
  }

  body.theme-brutalist .manage-location-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  body.theme-brutalist .manage-dim-grid {
    grid-template-columns: 1fr !important;
  }

  body.theme-brutalist .manage-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-brutalist .manage-image-preview img {
    height: 8.5rem;
  }

  body.theme-brutalist .tab-trigger {
    padding: 0.45rem 0.3rem;
  }

  body.theme-brutalist #adjust-sheet {
    padding: 0;
  }

  body.theme-brutalist #image-lightbox {
    padding: 0.35rem;
  }

  body.theme-brutalist .image-lightbox-frame {
    padding: 0.3rem;
  }

  body.theme-brutalist .image-lightbox-img {
    max-height: 80vh;
  }

  body.theme-brutalist .adjust-sheet-shell {
    width: 100%;
    max-width: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  body.theme-brutalist .adjust-sheet-header {
    padding: 0.5rem;
  }

  body.theme-brutalist .adjust-sheet-body {
    padding: 0.5rem;
  }
}
