/* homeinventory-ui-polish-v1 — dark semantic gradients, no data changes */
/* Add item photo: neutral charcoal throughout, never the old white surface. */
html[data-appearance="dark"] .new-item-photo,
.new-item-photo {
  background:#1a1b1e!important;
  border:1px solid #303239!important;
  box-shadow:none!important;
  color:#e7e8ea!important;
}
.new-item-photo-preview {
  background:#23252a!important;
  border:1px solid #3b3d45!important;
  color:#b5b9c2!important;
}
.new-item-photo-preview img {background:#23252a!important;}
.new-item-photo-heading strong {color:#e6e7eb!important;}
.new-item-photo-heading span {background:#2a2c31!important;color:#b9bbc4!important;}
.new-item-photo-body p,.new-item-photo-status {color:#a1a5ae!important;}
.new-item-photo .photo-pick-label,
.new-item-photo .photo-remove-button {
  background:#292b31!important;color:#e5e6e9!important;
  border:1px solid #42444e!important;box-shadow:none!important;
}

/* History: each action has a subtle full-card gradient; SVG freely floating. */
.history-list--activities {
  display:grid!important;
  gap:9px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.history-list--activities > .history-line.history-action {
  --activity-rgb:126,130,140;
  --activity-ink:#adb2bc;
  display:flex;
  align-items:center;
  min-height:77px;
  margin:0;
  padding:17px 21px!important;
  border:1px solid rgba(var(--activity-rgb),.23)!important;
  border-radius:13px!important;
  background:
    radial-gradient(ellipse 78% 185% at -9% 50%,rgba(var(--activity-rgb),.24),rgba(var(--activity-rgb),.07) 52%,transparent 95%),
    linear-gradient(100deg,#1c2023,#1a1b1e 75%)!important;
  box-shadow:none!important;
}
.history-list--activities > .history-line.history-action:last-child {border:1px solid rgba(var(--activity-rgb),.23)!important;}
.history-list--activities > .history-line.history-action--income {--activity-rgb:45,154,108;--activity-ink:#83d5a8;}
.history-list--activities > .history-line.history-action--exhausted {--activity-rgb:187,72,81;--activity-ink:#e89aa0;}
.history-list--activities > .history-line.history-action--adjustment {--activity-rgb:139,101,197;--activity-ink:#c2a5ed;}
.history-list--activities > .history-line.history-action--started {--activity-rgb:176,128,53;--activity-ink:#ead09a;}
.history-list--activities .history-symbol {
  flex:0 0 48px;
  width:48px!important;height:48px!important;
  border:0!important;border-radius:0!important;
  padding:0!important;
  display:grid!important;place-items:center!important;
  background:transparent!important;color:var(--activity-ink)!important;
  box-shadow:none!important;
}
.history-list--activities .history-symbol .line-icon {
  width:33px!important;height:33px!important;stroke-width:1.55!important;
  overflow:visible;
}
.history-list--activities .history-qty {color:var(--activity-ink)!important;font-variant-numeric:tabular-nums;}
.history-list--activities .history-main strong {color:#e8e9ec!important;}
.history-list--activities .history-main small {color:#a5a7ae!important;}
@media (max-width:600px) {
  .history-list--activities > .history-line.history-action {padding:13px!important;gap:10px!important;}
  .history-list--activities .history-symbol {flex-basis:36px;width:36px!important;height:36px!important;}
  .history-list--activities .history-symbol .line-icon {width:28px!important;height:28px!important;}
}

/* Financial overview: red for spending more, green for spending less. */
.financial-cards > .finance-card {
  min-width:0;
  border-radius:13px!important;
  border:1px solid #373a40!important;
  background:#1a1b1e!important;
  box-shadow:none!important;
  overflow:hidden;
}
.financial-cards > .finance-card--current.is-over {
  border-color:#60383b!important;
  background:radial-gradient(ellipse 89% 180% at -10% 50%,#903c4663,transparent 94%),linear-gradient(105deg,#292024,#1a1b1e 77%)!important;
}
.financial-cards > .finance-card--current.is-under {
  border-color:#2c5749!important;
  background:radial-gradient(ellipse 89% 180% at -10% 50%,#216c4b65,transparent 94%),linear-gradient(105deg,#1c2a24,#1a1b1e 77%)!important;
}
.financial-cards > .finance-card--current.is-even {
  background:radial-gradient(ellipse 85% 180% at -10% 50%,#69717a2e,transparent 94%),#1a1b1e!important;
}
.financial-cards > .finance-card--previous {
  background:radial-gradient(ellipse 88% 180% at -10% 50%,#71768138,transparent 94%),linear-gradient(105deg,#23252a,#1a1b1e 77%)!important;
}
.financial-cards > .finance-card--pending {
  border-color:#5e5037!important;
  background:radial-gradient(ellipse 88% 180% at -10% 50%,#98723355,transparent 94%),linear-gradient(105deg,#29251e,#1a1b1e 77%)!important;
}
.financial-cards .finance-card small {color:#b9bac1!important;}
.financial-cards .finance-card strong {color:#ebedf0!important;}
.financial-cards .finance-card span:not(.growth-percent) {color:#aaaeb8!important;}
/* Tint ONLY the percentage: negative red, positive green; other numbers unchanged. */
.growth-percent {font-variant-numeric:tabular-nums;font-weight:650;}
.growth-percent--negative {color:#e78b94!important;}
.growth-percent--positive {color:#7ad5a5!important;}
.growth-percent--zero {color:#adb0ba!important;}

/* Sidebar selected: restrained violet gradient outline, NOT a filled violet box. */
.sidebar :is(.nav-link,.area-link).active,
html[data-appearance="dark"] .sidebar :is(.nav-link,.area-link).active {
  color:#ebe6f2!important;
  background:
    linear-gradient(#212127,#212127) padding-box,
    linear-gradient(118deg,#7b4da1,#c08aee 52%,#66518c) border-box!important;
  border:1px solid transparent!important;
  box-shadow:0 0 0 1px #9c6ac520,0 0 14px #9c6ac519!important;
}
.sidebar :is(.nav-link,.area-link).active::before {display:none!important;}
.sidebar :is(.nav-link,.area-link).active span {color:inherit!important;}

/* Area filters: preserve exactly the normal dark background, gradient only the frame. */
.filter-row .chip,
.filter-row .chip.active {
  background:#1a1b1e!important;
  color:#c6c7ce!important;
  border:1px solid #373940!important;
  box-shadow:none!important;
}
.filter-row .chip.active {
  background:
    linear-gradient(#1a1b1e,#1a1b1e) padding-box,
    linear-gradient(112deg,#8853b9,#d69ef3 50%,#7353aa) border-box!important;
  border:1px solid transparent!important;
  color:#f0e7fb!important;
  box-shadow:0 0 0 1px #a66fcd22!important;
}
.filter-row .chip .line-icon {color:inherit!important;}
.filter-row .chip:hover:not(.active) {background:#222329!important;}
@media (prefers-reduced-motion:reduce) {
  .history-action,.finance-card,.chip {transition:none!important;}
}
