.sleek-inventory-table th[title] {
  cursor: help;
}

.sleek-inventory-table th[title]:hover {
  color: var(--yellow);
}

.inventory-actions .danger-action {
  background: #2a1010;
  border-color: rgba(223, 61, 49, 0.45);
  color: #ffffff;
}

.inventory-actions .danger-action:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.inventory-actions .success-action {
  background: #0f2a20;
  border-color: rgba(4, 120, 87, 0.45);
}

.inventory-actions .success-action:hover {
  border-color: #57d68d;
}

.expenses-panel {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.sold-toolbar-main {
  min-height: 38px;
}

.sold-toolbar-filters {
  gap: 9px;
}

.sold-toolbar-filters .secondary {
  min-width: 66px;
}

#soldFilterSummary {
  margin-left: 2px;
}

#soldRootLabel {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#soldRootLabel.is-ready {
  color: var(--green);
}

#soldRootLabel.needs-permission {
  color: var(--yellow);
}

.sold-folder-btn {
  white-space: nowrap;
}

.customer-view-btn {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.customer-view-btn i {
  margin: 0;
  font-size: 16px;
}

#activePrintBtn,
#soldPrintBtn,
#setSoldRootBtn,
#toggleBuyerDetailsBtn,
#clearBuyerLookupBtn {
  font-size: 14px;
}

#clearBuyerLookupBtn {
  color: #ffffff;
}

#decodeBtn {
  gap: 7px;
}

#clearBtn {
  font-size: 14px;
}

@media (max-width: 760px) {
  .inventory-actions,
  .docs-actions {
    gap: 7px;
  }

  #inventoryTableSold .col-actions {
    width: 190px;
  }
}

.vehicle-expense-actions select {
  max-width: 180px;
}

#vehExpList {
  background: #ffffff;
}

.veh-exp-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.veh-exp-head,
.veh-exp-row summary {
  display: grid;
  grid-template-columns: 90px minmax(220px, 1.4fr) 130px minmax(
      180px,
      1fr
    ) 90px 120px;
  gap: 12px;
  align-items: center;
}

.veh-exp-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.veh-exp-row {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.veh-exp-row:last-child {
  border-bottom: 0;
}

.veh-exp-row summary {
  min-height: 46px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.veh-exp-row summary::-webkit-details-marker {
  display: none;
}

.veh-exp-row summary:hover {
  background: #fffdf2;
}

.veh-exp-status {
  width: fit-content;
  min-width: 62px;
  display: inline-flex;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.veh-exp-status.active {
  background: rgba(4, 120, 87, 0.12);
  color: var(--green);
  border: 1px solid rgba(4, 120, 87, 0.22);
}

.veh-exp-status.sold {
  background: rgba(242, 195, 0, 0.14);
  color: #876400;
  border: 1px solid rgba(242, 195, 0, 0.38);
}

.veh-exp-vehicle {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.veh-exp-date,
.veh-exp-buyer,
.veh-exp-count {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.veh-exp-total {
  justify-self: end;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

.veh-exp-detail {
  padding: 10px 12px 12px 102px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
}

.veh-exp-vin {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.veh-exp-detail-item {
  display: grid;
  grid-template-columns: 120px minmax(160px, 0.8fr) minmax(200px, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 6px;
  background: #ffffff;
}

.veh-exp-detail-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.veh-exp-detail-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.veh-exp-detail-item b {
  justify-self: end;
  color: var(--green);
}

.veh-exp-detail-empty,
.veh-exp-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .veh-exp-head,
  .veh-exp-row summary {
    grid-template-columns: 80px minmax(180px, 1fr) 110px 90px;
  }

  .veh-exp-head span:nth-child(4),
  .veh-exp-head span:nth-child(5),
  .veh-exp-row summary .veh-exp-buyer,
  .veh-exp-row summary .veh-exp-count {
    display: none;
  }

  .veh-exp-detail {
    padding-left: 12px;
  }

  .veh-exp-detail-item {
    grid-template-columns: 1fr;
  }

  .veh-exp-detail-item b {
    justify-self: start;
  }
}

.veh-exp-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.veh-exp-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.veh-exp-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.veh-exp-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.veh-exp-stats strong.money {
  color: var(--green);
}

.vehicle-expense-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 280px) auto minmax(
      180px,
      280px
    ) auto minmax(180px, 280px) minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.vehicle-expense-actions label {
  margin: 0;
}

.vehicle-expense-actions select,
.vehicle-expense-actions input {
  max-width: none;
}

@media (max-width: 1100px) {
  .veh-exp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-expense-actions {
    grid-template-columns: 1fr;
  }
}

.biz-exp-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.biz-exp-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.biz-exp-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.biz-exp-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.biz-exp-stats strong.money {
  color: var(--green);
}

#bizExpList {
  background: #ffffff;
}

.biz-exp-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.biz-exp-head,
.biz-exp-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 0.8fr) 150px minmax(
      260px,
      1.4fr
    ) 46px;
  gap: 10px;
  align-items: center;
}

.biz-exp-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.biz-exp-row {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.biz-exp-row:hover {
  background: #fffdf2;
}

.biz-exp-row input,
.biz-exp-row textarea {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

.biz-exp-row textarea {
  resize: vertical;
}

.biz-exp-delete {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.biz-exp-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .biz-exp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .biz-exp-head,
  .biz-exp-row {
    grid-template-columns: 120px minmax(180px, 1fr) 140px 46px;
  }

  .biz-exp-head span:nth-child(4),
  .biz-exp-row textarea {
    display: none;
  }
}

@media (max-width: 700px) {
  .biz-exp-head {
    display: none;
  }

  .biz-exp-row {
    grid-template-columns: 1fr;
  }

  .biz-exp-row textarea {
    display: block;
  }

  .biz-exp-delete {
    width: 100%;
  }
}

#bizExpAddPresetBtn.month-complete,
.biz-count.month-complete {
  background: rgba(4, 120, 87, 0.14);
  color: var(--green);
  border-color: rgba(4, 120, 87, 0.35);
}

#bizExpAddPresetBtn.month-complete:hover {
  border-color: #57d68d;
}

.oth-exp-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.oth-exp-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.oth-exp-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.oth-exp-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.oth-exp-stats strong.money {
  color: var(--green);
}

#othExpList {
  background: #ffffff;
}

.oth-exp-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.oth-exp-head,
.oth-exp-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 0.8fr) 150px minmax(
      260px,
      1.4fr
    ) 46px;
  gap: 10px;
  align-items: center;
}

.oth-exp-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.oth-exp-row {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.oth-exp-row:hover {
  background: #fffdf2;
}

.oth-exp-row input,
.oth-exp-row textarea {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

.oth-exp-row textarea {
  resize: vertical;
}

.oth-exp-delete {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.oth-exp-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .oth-exp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oth-exp-head,
  .oth-exp-row {
    grid-template-columns: 120px minmax(180px, 1fr) 140px 46px;
  }

  .oth-exp-head span:nth-child(4),
  .oth-exp-row textarea {
    display: none;
  }
}

@media (max-width: 700px) {
  .oth-exp-head {
    display: none;
  }

  .oth-exp-row {
    grid-template-columns: 1fr;
  }

  .oth-exp-row textarea {
    display: block;
  }

  .oth-exp-delete {
    width: 100%;
  }
}

.total-expense-actions {
  display: grid;
  grid-template-columns: auto minmax(140px, 190px) auto minmax(
      180px,
      240px
    ) auto minmax(180px, 240px) minmax(240px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.total-expense-actions label {
  margin: 0;
}

.total-expense-actions select,
.total-expense-actions input {
  max-width: none;
}

.tot-exp-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tot-exp-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.tot-exp-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.tot-exp-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.tot-exp-stats strong.money {
  color: var(--green);
}

#totExpList {
  background: #ffffff;
}

.tot-exp-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.tot-exp-head,
.tot-exp-row summary {
  display: grid;
  grid-template-columns: 90px 120px minmax(160px, 0.8fr) minmax(
      190px,
      1fr
    ) minmax(260px, 1.4fr) 110px;
  gap: 12px;
  align-items: center;
}

.tot-exp-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tot-exp-row {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.tot-exp-row summary {
  min-height: 46px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.tot-exp-row summary::-webkit-details-marker {
  display: none;
}

.tot-exp-row summary:hover {
  background: #fffdf2;
}

.tot-exp-source {
  width: fit-content;
  min-width: 72px;
  display: inline-flex;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tot-exp-source.vehicle {
  background: rgba(242, 195, 0, 0.14);
  color: #876400;
  border: 1px solid rgba(242, 195, 0, 0.38);
}

.tot-exp-source.business {
  background: rgba(4, 120, 87, 0.12);
  color: var(--green);
  border: 1px solid rgba(4, 120, 87, 0.22);
}

.tot-exp-date,
.tot-exp-company,
.tot-exp-context,
.tot-exp-note {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tot-exp-company {
  color: var(--ink);
  font-weight: 850;
}

.tot-exp-amount {
  justify-self: end;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

.tot-exp-detail {
  display: grid;
  gap: 5px;
  padding: 10px 12px 12px 114px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tot-exp-detail strong {
  color: var(--ink);
}

.tot-exp-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .total-expense-actions {
    grid-template-columns: 1fr;
  }

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

  .tot-exp-head,
  .tot-exp-row summary {
    grid-template-columns: 90px 110px minmax(180px, 1fr) 100px;
  }

  .tot-exp-head span:nth-child(4),
  .tot-exp-head span:nth-child(5),
  .tot-exp-row summary .tot-exp-context,
  .tot-exp-row summary .tot-exp-note {
    display: none;
  }

  .tot-exp-detail {
    padding-left: 12px;
  }
}

.itm-prof-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.itm-prof-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.itm-prof-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.itm-prof-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.itm-prof-stats strong.money {
  color: var(--green);
}

#itmProfList {
  background: #ffffff;
}

.itm-prof-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.itm-prof-head,
.itm-prof-row summary {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1.2fr) minmax(
      180px,
      1fr
    ) 110px 110px 100px 120px;
  gap: 12px;
  align-items: center;
}

.itm-prof-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.itm-prof-row {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.itm-prof-row summary {
  min-height: 46px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.itm-prof-row summary::-webkit-details-marker {
  display: none;
}

.itm-prof-row summary:hover {
  background: #fffdf2;
}

.itm-prof-date,
.itm-prof-buyer {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itm-prof-vehicle {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itm-prof-money,
.itm-prof-profit {
  justify-self: end;
  font-size: 14px;
  font-weight: 900;
}

.itm-prof-profit {
  color: var(--green);
}

.itm-prof-profit.loss {
  color: #ef4444;
}

.itm-prof-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 7px 14px;
  padding: 10px 12px 12px 132px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.itm-prof-detail strong {
  color: var(--ink);
}

.inventory-search-context,
.sale-search-context,
.profit-search-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}

.inventory-search-context > strong,
.sale-search-context > strong,
.profit-search-context > strong {
  color: var(--ink);
}

.inventory-search-context span,
.sale-search-context span,
.profit-search-context span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inventory-search-context b,
.sale-search-context b,
.profit-search-context b {
  color: var(--ink);
}

.tot-exp-search-match {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.sold-btn.search-match-action {
  border-color: var(--kw-hl-bg, #facc15) !important;
  background: var(--kw-hl-bg, #facc15) !important;
  color: var(--kw-hl-fg, #0b1220) !important;
  outline: 2px solid color-mix(in srgb, var(--kw-hl-bg, #facc15) 55%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--kw-hl-bg, #facc15) 22%, transparent);
}

.monthly-report-panel {
  display: grid;
  gap: 14px;
}

.monthly-report-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.monthly-report-period,
.monthly-report-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.monthly-report-period {
  width: 100%;
}

.monthly-report-period label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.monthly-report-period select {
  width: min(220px, 22vw);
  min-width: 140px;
  max-width: 220px;
  flex: 0 1 220px;
}

#monthlyReportResetBtn {
  width: auto;
  min-width: 74px;
  min-height: 40px;
  flex: 0 0 auto;
  justify-content: center;
}

.section-toolbar-monthly.is-active {
  grid-template-columns: repeat(2, auto) !important;
}

/* Keep VINs visually centered beneath their centered table headings. */
#inventoryTableActive tr.data-row > td:nth-child(10),
#inventoryTableSold tr.data-row > td:nth-child(10) {
  text-align: center !important;
}

.monthly-report-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.monthly-report-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.monthly-report-stats > div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.monthly-report-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.monthly-report-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.monthly-report-stats strong.money {
  color: var(--green);
}

.monthly-report-help,
.monthly-report-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.monthly-report-status {
  min-height: 18px;
  color: var(--green);
}

.monthly-report-status.is-error {
  color: var(--red);
}

.monthly-report-table-wrap {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.monthly-report-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.monthly-report-table th {
  padding: 10px 8px;
  border-bottom: 3px solid var(--yellow);
  background: var(--dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.monthly-report-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.monthly-report-table tbody tr:last-child td {
  border-bottom: 0;
}

.monthly-report-table tbody tr:nth-child(even) td {
  background: var(--panel-2);
}

.monthly-report-table tbody tr.is-incomplete td {
  background: color-mix(in srgb, var(--red) 8%, var(--panel));
}

.monthly-report-table td:nth-child(4) {
  color: var(--green);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.monthly-report-table td:nth-child(6),
.monthly-report-table td:nth-child(7) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.monthly-report-empty {
  padding: 24px !important;
  color: var(--muted) !important;
  text-align: center;
}

.itm-prof-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .itm-prof-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .itm-prof-head,
  .itm-prof-row summary {
    grid-template-columns: 110px minmax(180px, 1fr) 100px 110px;
  }

  .itm-prof-head span:nth-child(3),
  .itm-prof-head span:nth-child(5),
  .itm-prof-head span:nth-child(6),
  .itm-prof-row summary .itm-prof-buyer,
  .itm-prof-row summary .itm-prof-money:nth-of-type(5),
  .itm-prof-row summary .itm-prof-money:nth-of-type(6) {
    display: none;
  }

  .itm-prof-detail {
    grid-template-columns: 1fr;
    padding-left: 12px;
  }
}

.tot-prof-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tot-prof-stats > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.tot-prof-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}

.tot-prof-stats strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.tot-prof-stats strong.money {
  color: var(--green);
}

#totProfList {
  background: #ffffff;
}

.tot-prof-ledger {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.tot-prof-head,
.tot-prof-row summary {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1.2fr) minmax(
      180px,
      1fr
    ) 120px 120px 120px;
  gap: 12px;
  align-items: center;
}

.tot-prof-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tot-prof-row {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.tot-prof-row summary {
  min-height: 46px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.tot-prof-row summary::-webkit-details-marker {
  display: none;
}

.tot-prof-row summary:hover {
  background: #fffdf2;
}

.tot-prof-date,
.tot-prof-buyer {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tot-prof-vehicle {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tot-prof-money,
.tot-prof-profit {
  justify-self: end;
  font-size: 14px;
  font-weight: 900;
}

.tot-prof-profit {
  color: var(--green);
}

.tot-prof-profit.loss {
  color: #ef4444;
}

.tot-prof-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 7px 14px;
  padding: 10px 12px 12px 132px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tot-prof-detail strong {
  color: var(--ink);
}

.tot-prof-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .tot-prof-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tot-prof-head,
  .tot-prof-row summary {
    grid-template-columns: 110px minmax(180px, 1fr) 110px;
  }

  .tot-prof-head span:nth-child(3),
  .tot-prof-head span:nth-child(4),
  .tot-prof-head span:nth-child(5),
  .tot-prof-row summary .tot-prof-buyer,
  .tot-prof-row summary .tot-prof-money {
    display: none;
  }

  .tot-prof-detail {
    grid-template-columns: 1fr;
    padding-left: 12px;
  }
}

.tot-prof-grouped {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.tot-prof-group-head,
.tot-prof-month summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 100px 130px 130px 130px 130px;
  gap: 12px;
  align-items: center;
}

.tot-prof-group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: var(--dark);
  color: #ffffff;
  border-bottom: 3px solid var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tot-prof-month {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.tot-prof-month summary {
  min-height: 48px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.tot-prof-month summary::-webkit-details-marker {
  display: none;
}

.tot-prof-month summary:hover {
  background: #fffdf2;
}

.tot-prof-month-label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.tot-prof-month summary span:not(.tot-prof-month-label) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.tot-prof-month summary .money {
  justify-self: end;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.tot-prof-month summary .tot-prof-profit.loss,
.tot-prof-subrow .loss {
  color: #ef4444;
}

.tot-prof-subhead,
.tot-prof-subrow {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1.2fr) minmax(
      180px,
      1fr
    ) 120px 120px 100px 120px;
  gap: 12px;
  align-items: center;
}

.tot-prof-subhead {
  padding: 9px 12px 8px 36px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tot-prof-subrow {
  min-height: 42px;
  padding: 7px 12px 7px 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tot-prof-subrow span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tot-prof-subrow span:nth-child(2) {
  color: var(--ink);
  font-weight: 900;
}

.tot-prof-subrow .money {
  justify-self: end;
  color: var(--green);
  font-weight: 900;
}

@media (max-width: 1100px) {
  .tot-prof-group-head,
  .tot-prof-month summary {
    grid-template-columns: minmax(180px, 1fr) 80px 110px;
  }

  .tot-prof-group-head span:nth-child(3),
  .tot-prof-group-head span:nth-child(4),
  .tot-prof-group-head span:nth-child(5),
  .tot-prof-month summary span:nth-child(3),
  .tot-prof-month summary span:nth-child(4),
  .tot-prof-month summary span:nth-child(5) {
    display: none;
  }

  .tot-prof-subhead,
  .tot-prof-subrow {
    grid-template-columns: 110px minmax(180px, 1fr) 110px;
    padding-left: 12px;
  }

  .tot-prof-subhead span:nth-child(3),
  .tot-prof-subhead span:nth-child(4),
  .tot-prof-subhead span:nth-child(5),
  .tot-prof-subhead span:nth-child(6),
  .tot-prof-subrow span:nth-child(3),
  .tot-prof-subrow span:nth-child(4),
  .tot-prof-subrow span:nth-child(5),
  .tot-prof-subrow span:nth-child(6) {
    display: none;
  }
}

.summary-grid-with-action {
  grid-template-columns: minmax(0, 1fr) auto;
}

.summary-heading-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: end;
}

.summary-print-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 9px;
  font-size: 14px;
}

.panel-print-bar {
  display: none;
}

@media (max-width: 760px) {
  .summary-grid-with-action {
    grid-template-columns: 1fr;
  }

  .summary-heading-actions {
    justify-self: start;
  }
}

.tot-exp-stats {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.tot-exp-month-ledger {
  display: grid;
  gap: 18px;
  background: transparent;
}

.tot-exp-month summary {
  border-left: 4px solid var(--yellow);
}

.tot-exp-month {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tot-exp-month summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 150px 150px 170px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.tot-exp-month summary::-webkit-details-marker {
  display: none;
}

.tot-exp-month summary:hover {
  background: #fafaf8;
}

.tot-exp-month[open] {
  border-color: rgba(242, 195, 0, 0.45);
}

.tot-exp-month[open] summary {
  border-bottom: 1px solid var(--line);
}

.tot-exp-month summary > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
}

.tot-exp-month summary > span:nth-child(2) {
  border-left: 3px solid var(--yellow);
}

.tot-exp-month summary > span:nth-child(3) {
  border-left: 3px solid #57d68d;
}

.tot-exp-month summary > span:nth-child(4) {
  border-left: 3px solid #7c8aa5;
}

.tot-exp-month summary > span:nth-child(5) {
  border-left: 3px solid var(--green);
  background: rgba(4, 120, 87, 0.08);
}

.tot-exp-month summary > span:last-child {
  padding-left: 10px;
  border-left: 2px solid var(--yellow);
}

.tot-exp-month summary > span:last-child strong {
  font-size: 18px;
}

.tot-exp-month summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.tot-exp-month summary strong {
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.tot-exp-month summary .money {
  color: var(--green);
  text-align: right;
}

.tot-exp-month-main {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 10px !important;
}

.tot-exp-month-main strong {
  color: var(--ink) !important;
  font-size: 16px !important;
}

.tot-exp-month-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tot-exp-month-main small {
  margin-left: 4px;
}

.tot-exp-caret::before {
  content: "▸";
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
}

.tot-exp-month[open] .tot-exp-caret::before {
  content: "▾";
}

.tot-exp-month-items {
  display: grid;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.tot-exp-month-item {
  display: grid;
  grid-template-columns: 95px 115px minmax(150px, 0.8fr) minmax(
      180px,
      1fr
    ) minmax(240px, 1.4fr) 110px;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.tot-exp-month-item:last-child {
  border-bottom: 0;
}

.tot-exp-month-item span,
.tot-exp-month-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tot-exp-month-item strong {
  justify-self: end;
  color: var(--green);
}

.tot-exp-source.personal {
  background: rgba(55, 83, 109, 0.12);
  color: var(--blue);
  border: 1px solid rgba(55, 83, 109, 0.24);
}

@media (max-width: 1100px) {
  .tot-exp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tot-exp-month summary {
    grid-template-columns: 1fr 110px;
  }

  .tot-exp-month summary > span:nth-child(2),
  .tot-exp-month summary > span:nth-child(3),
  .tot-exp-month summary > span:nth-child(4) {
    display: none;
  }

  .tot-exp-month-item {
    grid-template-columns: 90px minmax(140px, 1fr) 100px;
  }

  .tot-exp-month-item span:nth-child(2),
  .tot-exp-month-item span:nth-child(4),
  .tot-exp-month-item span:nth-child(5) {
    display: none;
  }
}

.images-panel {
  display: none;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.vehicle-images-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font-family: inherit;
}

.images-row > td {
  padding: 0 !important;
  background: var(--panel-2);
}

.images-panel {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.images-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.images-panel-head strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.images-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.image-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.image-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.image-preview-btn {
  width: 100%;
  height: 88px;
  padding: 0;
  border: 0;
  background: #ffffff;
  cursor: pointer;
}

.image-preview-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: #3b0f0a;
  color: #ffffff;
  font-weight: 900;
}

.image-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
}

.vehicle-images-input {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}

.image-panel-close {
  min-height: 32px;
  padding: 6px 12px;
}

.docs-list-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
}

.docs-list-head strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.docs-list-body {
  display: grid;
  gap: 6px;
}

.docs-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 8px;
  align-items: center;
}

.docs-file-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-delete-btn,
.docs-close-btn {
  min-height: 26px;
  padding: 4px 8px;
}

.docs-delete-btn {
  width: 26px;
  padding: 0;
  border-radius: 999px;
  background: #3b0f0a;
  color: #ffffff;
  font-weight: 900;
}

.vehicle-images-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.vehicle-images-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.vehicle-images-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.vehicle-images-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.vehicle-image-tile,
.vehicle-image-add-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.vehicle-image-preview {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.vehicle-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
}

.vehicle-image-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: #3b0f0a;
  color: #ffffff;
  font-weight: 900;
}

.vehicle-image-add-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.vehicle-image-add-tile i {
  font-size: 26px;
}

@media (max-width: 760px) {
  .vehicle-images-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-cell,
.docs-cell {
  white-space: nowrap;
}

.gallery-actions,
.docs-actions {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.gallery-actions button,
.docs-actions button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  font-size: 13px;
}

.gallery-actions button span,
.docs-actions button span {
  display: none;
}

.itm-prof-head,
.itm-prof-row summary {
  display: grid !important;
  grid-template-columns: 130px minmax(280px, 1.4fr) minmax(
      220px,
      1fr
    ) 130px 130px 110px 130px !important;
  gap: 14px !important;
  align-items: center !important;
}

.itm-prof-money,
.itm-prof-profit,
.itm-prof-row summary .money,
.itm-prof-head span:nth-child(n + 4) {
  justify-self: center !important;
  text-align: center !important;
}

.tot-prof-subhead,
.tot-prof-subrow {
  display: grid !important;
  grid-template-columns: 130px minmax(280px, 1.4fr) minmax(
      220px,
      1fr
    ) 130px 130px 110px 130px !important;
  gap: 14px !important;
  align-items: center !important;
}

.tot-prof-subrow .money,
.tot-prof-subhead span:nth-child(n + 4) {
  justify-self: center !important;
  text-align: center !important;
}

.tot-exp-month summary {
  grid-template-columns: minmax(300px, 1fr) 150px 150px 150px 170px !important;
}

@media (max-width: 1100px) {
  .itm-prof-head,
  .itm-prof-row summary {
    grid-template-columns: 110px minmax(180px, 1fr) 110px 110px !important;
  }

  .itm-prof-head span:nth-child(3),
  .itm-prof-head span:nth-child(5),
  .itm-prof-head span:nth-child(6),
  .itm-prof-row summary .itm-prof-buyer,
  .itm-prof-row summary .itm-prof-money:nth-of-type(2),
  .itm-prof-row summary .itm-prof-money:nth-of-type(3) {
    display: none !important;
  }

  .tot-prof-subhead,
  .tot-prof-subrow {
    grid-template-columns: 110px minmax(180px, 1fr) 110px 110px !important;
    padding-left: 12px !important;
  }

  .tot-prof-subhead span:nth-child(3),
  .tot-prof-subhead span:nth-child(5),
  .tot-prof-subhead span:nth-child(6),
  .tot-prof-subrow span:nth-child(3),
  .tot-prof-subrow span:nth-child(5),
  .tot-prof-subrow span:nth-child(6) {
    display: none !important;
  }
}

.itm-prof-head span:nth-child(4),
.itm-prof-head span:nth-child(5),
.itm-prof-head span:nth-child(6),
.itm-prof-head span:nth-child(7) {
  justify-self: center;
  text-align: center;
}

.itm-prof-money,
.itm-prof-profit {
  justify-self: center;
  text-align: center;
}

.tot-prof-subhead span:nth-child(4),
.tot-prof-subhead span:nth-child(5),
.tot-prof-subhead span:nth-child(6),
.tot-prof-subhead span:nth-child(7) {
  justify-self: center;
  text-align: center;
}

.tot-prof-subrow .money {
  justify-self: center;
  text-align: center;
}

body[data-theme="black"] #activeContainer,
body[data-theme="black"] #soldContainer,
body[data-theme="black"] #vehExpList,
body[data-theme="black"] #bizExpList,
body[data-theme="black"] #othExpList,
body[data-theme="black"] #totExpList,
body[data-theme="black"] #itmProfList,
body[data-theme="black"] #totProfList,
body[data-theme="classic"] #activeContainer,
body[data-theme="classic"] #soldContainer,
body[data-theme="classic"] #vehExpList,
body[data-theme="classic"] #bizExpList,
body[data-theme="classic"] #othExpList,
body[data-theme="classic"] #totExpList,
body[data-theme="classic"] #itmProfList,
body[data-theme="classic"] #totProfList {
  background: var(--panel);
  border-color: var(--line);
}

body[data-theme="black"] tbody td,
body[data-theme="black"] tbody tr.expenses-row > td,
body[data-theme="black"] tbody tr.sale-row > td,
body[data-theme="black"] .veh-exp-row,
body[data-theme="black"] .biz-exp-row,
body[data-theme="black"] .oth-exp-row,
body[data-theme="black"] .tot-exp-row,
body[data-theme="black"] .itm-prof-row,
body[data-theme="black"] .tot-prof-row,
body[data-theme="black"] .tot-prof-month,
body[data-theme="black"] .tot-prof-subrow,
body[data-theme="black"] .tot-exp-month,
body[data-theme="black"] .tot-exp-month-item,
body[data-theme="classic"] tbody td,
body[data-theme="classic"] tbody tr.expenses-row > td,
body[data-theme="classic"] tbody tr.sale-row > td,
body[data-theme="classic"] .veh-exp-row,
body[data-theme="classic"] .biz-exp-row,
body[data-theme="classic"] .oth-exp-row,
body[data-theme="classic"] .tot-exp-row,
body[data-theme="classic"] .itm-prof-row,
body[data-theme="classic"] .tot-prof-row,
body[data-theme="classic"] .tot-prof-month,
body[data-theme="classic"] .tot-prof-subrow,
body[data-theme="classic"] .tot-exp-month,
body[data-theme="classic"] .tot-exp-month-item {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="black"] tbody tr.data-row:hover td,
body[data-theme="black"] .veh-exp-row summary:hover,
body[data-theme="black"] .biz-exp-row:hover,
body[data-theme="black"] .oth-exp-row:hover,
body[data-theme="black"] .tot-exp-row summary:hover,
body[data-theme="black"] .itm-prof-row summary:hover,
body[data-theme="black"] .tot-prof-row summary:hover,
body[data-theme="black"] .tot-prof-month summary:hover,
body[data-theme="classic"] tbody tr.data-row:hover td,
body[data-theme="classic"] .veh-exp-row summary:hover,
body[data-theme="classic"] .biz-exp-row:hover,
body[data-theme="classic"] .oth-exp-row:hover,
body[data-theme="classic"] .tot-exp-row summary:hover,
body[data-theme="classic"] .itm-prof-row summary:hover,
body[data-theme="classic"] .tot-prof-row summary:hover,
body[data-theme="classic"] .tot-prof-month summary:hover {
  background: var(--panel-3);
}

body[data-theme="black"] .veh-exp-ledger,
body[data-theme="black"] .biz-exp-ledger,
body[data-theme="black"] .oth-exp-ledger,
body[data-theme="black"] .tot-exp-ledger,
body[data-theme="black"] .itm-prof-ledger,
body[data-theme="black"] .tot-prof-ledger,
body[data-theme="black"] .tot-prof-grouped,
body[data-theme="classic"] .veh-exp-ledger,
body[data-theme="classic"] .biz-exp-ledger,
body[data-theme="classic"] .oth-exp-ledger,
body[data-theme="classic"] .tot-exp-ledger,
body[data-theme="classic"] .itm-prof-ledger,
body[data-theme="classic"] .tot-prof-ledger,
body[data-theme="classic"] .tot-prof-grouped {
  background: var(--panel);
}

body[data-theme="black"] .veh-exp-detail,
body[data-theme="black"] .tot-exp-detail,
body[data-theme="black"] .itm-prof-detail,
body[data-theme="black"] .tot-prof-detail,
body[data-theme="black"] .tot-prof-subhead,
body[data-theme="black"] .tot-exp-month-items,
body[data-theme="classic"] .veh-exp-detail,
body[data-theme="classic"] .tot-exp-detail,
body[data-theme="classic"] .itm-prof-detail,
body[data-theme="classic"] .tot-prof-detail,
body[data-theme="classic"] .tot-prof-subhead,
body[data-theme="classic"] .tot-exp-month-items {
  background: var(--panel-2);
  border-color: var(--line);
}

body[data-theme="black"] .veh-exp-detail-item,
body[data-theme="classic"] .veh-exp-detail-item {
  background: var(--panel);
  border-color: var(--line);
}

body[data-theme="black"] .itm-prof-vehicle,
body[data-theme="black"] .tot-prof-vehicle,
body[data-theme="black"] .tot-exp-company,
body[data-theme="black"] .veh-exp-vehicle,
body[data-theme="black"] .tot-prof-subrow span:nth-child(2),
body[data-theme="classic"] .itm-prof-vehicle,
body[data-theme="classic"] .tot-prof-vehicle,
body[data-theme="classic"] .tot-exp-company,
body[data-theme="classic"] .veh-exp-vehicle,
body[data-theme="classic"] .tot-prof-subrow span:nth-child(2) {
  color: var(--ink);
}

body[data-theme="black"] .itm-prof-date,
body[data-theme="black"] .itm-prof-buyer,
body[data-theme="black"] .tot-prof-date,
body[data-theme="black"] .tot-prof-buyer,
body[data-theme="black"] .tot-exp-date,
body[data-theme="black"] .tot-exp-context,
body[data-theme="black"] .tot-exp-note,
body[data-theme="black"] .veh-exp-date,
body[data-theme="black"] .veh-exp-buyer,
body[data-theme="black"] .veh-exp-count,
body[data-theme="classic"] .itm-prof-date,
body[data-theme="classic"] .itm-prof-buyer,
body[data-theme="classic"] .tot-prof-date,
body[data-theme="classic"] .tot-prof-buyer,
body[data-theme="classic"] .tot-exp-date,
body[data-theme="classic"] .tot-exp-context,
body[data-theme="classic"] .tot-exp-note,
body[data-theme="classic"] .veh-exp-date,
body[data-theme="classic"] .veh-exp-buyer,
body[data-theme="classic"] .veh-exp-count {
  color: var(--muted);
}

body[data-theme="black"] .num-input,
body[data-theme="black"] .date-input,
body[data-theme="black"] .make-code-input,
body[data-theme="classic"] .num-input,
body[data-theme="classic"] .date-input,
body[data-theme="classic"] .make-code-input {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="black"] .price,
body[data-theme="classic"] .price {
  color: #b39cff;
}

body[data-theme="black"] .vin-cell,
body[data-theme="classic"] .vin-cell {
  color: #6ee7b7;
}

body[data-theme="classic"] .admin-sidebar,
body[data-theme="classic"] .admin-topbar {
  background: linear-gradient(180deg, #111827, #0b1220);
}

body[data-theme="black"] .admin-sidebar,
body[data-theme="black"] .admin-topbar {
  background: linear-gradient(180deg, #02040a, #070a12);
}

body[data-theme="black"] thead th,
body[data-theme="classic"] thead th,
body[data-theme="black"] .veh-exp-head,
body[data-theme="black"] .biz-exp-head,
body[data-theme="black"] .oth-exp-head,
body[data-theme="black"] .tot-exp-head,
body[data-theme="black"] .itm-prof-head,
body[data-theme="black"] .tot-prof-head,
body[data-theme="black"] .tot-prof-group-head,
body[data-theme="classic"] .veh-exp-head,
body[data-theme="classic"] .biz-exp-head,
body[data-theme="classic"] .oth-exp-head,
body[data-theme="classic"] .tot-exp-head,
body[data-theme="classic"] .itm-prof-head,
body[data-theme="classic"] .tot-prof-head,
body[data-theme="classic"] .tot-prof-group-head {
  background: #050814;
  color: #ffffff;
  border-bottom-color: var(--yellow);
}

body[data-theme="black"] tbody td,
body[data-theme="classic"] tbody td,
body[data-theme="black"] .tot-prof-subrow,
body[data-theme="classic"] .tot-prof-subrow,
body[data-theme="black"] .tot-exp-month-item,
body[data-theme="classic"] .tot-exp-month-item {
  background: #111827;
}

body[data-theme="black"] tbody tr.data-row:nth-child(4n + 1) td,
body[data-theme="classic"] tbody tr.data-row:nth-child(4n + 1) td,
body[data-theme="black"] .tot-prof-subrow:nth-child(even),
body[data-theme="classic"] .tot-prof-subrow:nth-child(even),
body[data-theme="black"] .tot-exp-month-item:nth-child(even),
body[data-theme="classic"] .tot-exp-month-item:nth-child(even) {
  background: #0d1424;
}

body[data-theme="black"] tbody tr.data-row:hover td,
body[data-theme="classic"] tbody tr.data-row:hover td {
  background: #18233a;
}

body[data-theme="black"] .tot-prof-month,
body[data-theme="black"] .tot-exp-month,
body[data-theme="classic"] .tot-prof-month,
body[data-theme="classic"] .tot-exp-month {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="black"] .tot-prof-month summary,
body[data-theme="black"] .tot-exp-month summary,
body[data-theme="classic"] .tot-prof-month summary,
body[data-theme="classic"] .tot-exp-month summary {
  background: #151c2d;
}

body[data-theme="black"] .tot-prof-month[open] summary,
body[data-theme="black"] .tot-exp-month[open] summary,
body[data-theme="classic"] .tot-prof-month[open] summary,
body[data-theme="classic"] .tot-exp-month[open] summary {
  background: #1a2338;
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="black"] .tot-prof-month-label,
body[data-theme="classic"] .tot-prof-month-label,
body[data-theme="black"] .tot-exp-month-main strong,
body[data-theme="classic"] .tot-exp-month-main strong {
  color: #ffffff !important;
}

body[data-theme="black"]
  .tot-prof-month
  summary
  span:not(.tot-prof-month-label),
body[data-theme="classic"]
  .tot-prof-month
  summary
  span:not(.tot-prof-month-label),
body[data-theme="black"] .tot-exp-month summary small,
body[data-theme="classic"] .tot-exp-month summary small {
  color: #b8c1d4;
}

body[data-theme="black"] .num-input,
body[data-theme="black"] .date-input,
body[data-theme="black"] .make-code-input,
body[data-theme="classic"] .num-input,
body[data-theme="classic"] .date-input,
body[data-theme="classic"] .make-code-input {
  background: #0b1020;
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="black"] .inventory-actions .secondary,
body[data-theme="black"] .docs-actions .secondary,
body[data-theme="classic"] .inventory-actions .secondary,
body[data-theme="classic"] .docs-actions .secondary {
  background: #050814;
  border-color: rgba(255, 255, 255, 0.12);
}

.business-expense-actions,
.personal-expense-actions {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
  width: 100%;
}

.business-expense-actions label,
.personal-expense-actions label {
  margin: 0;
  white-space: nowrap;
}

.business-expense-actions select,
.personal-expense-actions select {
  flex: 0 0 280px;
  max-width: 280px !important;
}

.business-expense-actions input,
.personal-expense-actions input {
  flex: 0 1 330px;
  max-width: 330px !important;
}

.business-expense-actions button,
.personal-expense-actions button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  white-space: nowrap;
}

#bizExpAddPresetBtn,
#othExpExportCsvBtn {
  margin-left: auto !important;
}

#bizExpAddBtn,
#othExpAddBtn {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

#bizExpAddBtn::before,
#othExpAddBtn::before {
  content: none !important;
}

@media (max-width: 760px) {
  .business-expense-actions,
  .personal-expense-actions {
    flex-wrap: wrap;
  }

  .business-expense-actions select,
  .personal-expense-actions select,
  .business-expense-actions input,
  .personal-expense-actions input {
    flex: 1 1 100%;
    max-width: none !important;
  }

  #bizExpAddPresetBtn,
  #othExpExportCsvBtn {
    margin-left: 0 !important;
  }
}

.vehicle-expense-actions {
  display: grid !important;
  grid-template-columns: auto 260px auto 260px auto 260px 320px auto 1fr !important;
  gap: 8px;
  align-items: center;
}

.vehicle-expense-actions label {
  margin: 0;
  white-space: nowrap;
}

.vehicle-expense-actions select {
  width: 100%;
  max-width: none !important;
}

.vehicle-expense-actions input {
  width: 100%;
  max-width: none !important;
}

#vehExpClearFilterBtn {
  margin-left: 0 !important;
  justify-self: start !important;
}

.total-expense-actions {
  display: grid !important;
  grid-template-columns: auto 190px auto 240px auto 240px 320px auto 1fr auto auto !important;
  gap: 8px;
  align-items: center;
}

.total-expense-actions label {
  margin: 0;
  white-space: nowrap;
}

.total-expense-actions select {
  width: 100%;
  max-width: none !important;
}

.total-expense-actions input {
  width: 100%;
  max-width: none !important;
}

#totExpClearFilterBtn {
  margin-left: 0 !important;
  justify-self: start !important;
}

#totExpExportCsvBtn,
#totExpExportTotalsCsvBtn {
  margin-left: 0 !important;
  justify-self: end !important;
}

#totProfExportCsvBtn {
  margin-left: auto !important;
}

#totProfClearFilterBtn {
  margin-left: 0 !important;
}

#inventoryTableActive th:nth-child(12),
#inventoryTableActive th:nth-child(13),
#inventoryTableActive th:nth-child(14),
#inventoryTableSold th:nth-child(12),
#inventoryTableSold th:nth-child(13),
#inventoryTableSold th:nth-child(14) {
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#inventoryTableActive td:nth-child(12),
#inventoryTableActive td:nth-child(13),
#inventoryTableActive td:nth-child(14),
#inventoryTableSold td:nth-child(12),
#inventoryTableSold td:nth-child(13),
#inventoryTableSold td:nth-child(14) {
  text-align: center !important;
  vertical-align: middle;
}

#inventoryTableActive td:nth-child(12) .inventory-actions,
#inventoryTableSold td:nth-child(12) .inventory-actions,
#inventoryTableActive td:nth-child(13) .gallery-actions,
#inventoryTableSold td:nth-child(13) .gallery-actions,
#inventoryTableActive td:nth-child(14) .docs-actions,
#inventoryTableSold td:nth-child(14) .docs-actions {
  justify-content: center;
}

#inventoryTableActive th:nth-child(7),
#inventoryTableActive th:nth-child(8),
#inventoryTableActive th:nth-child(10),
#inventoryTableActive th:nth-child(11),
#inventoryTableSold th:nth-child(7),
#inventoryTableSold th:nth-child(8),
#inventoryTableSold th:nth-child(10),
#inventoryTableSold th:nth-child(11) {
  text-align: center !important;
}

#inventoryTableActive td:nth-child(7),
#inventoryTableActive td:nth-child(8),
#inventoryTableActive td:nth-child(10),
#inventoryTableActive td:nth-child(11),
#inventoryTableSold td:nth-child(7),
#inventoryTableSold td:nth-child(8),
#inventoryTableSold td:nth-child(10),
#inventoryTableSold td:nth-child(11) {
  text-align: center !important;
}

#inventoryTableActive th:nth-child(3),
#inventoryTableActive th:nth-child(4),
#inventoryTableActive th:nth-child(5),
#inventoryTableActive th:nth-child(6),
#inventoryTableActive th:nth-child(9),
#inventoryTableSold th:nth-child(3),
#inventoryTableSold th:nth-child(4),
#inventoryTableSold th:nth-child(5),
#inventoryTableSold th:nth-child(6),
#inventoryTableSold th:nth-child(9) {
  text-align: center !important;
}

#inventoryTableActive td:nth-child(3),
#inventoryTableSold td:nth-child(3) {
  text-align: center;
}

#inventoryTableActive td:nth-child(3) > *,
#inventoryTableSold td:nth-child(3) > * {
  justify-content: center !important;
}

.vehicle-description-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  padding: 22px;
}

.vehicle-description-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.vehicle-description-modal-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.vehicle-description-modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.vehicle-description-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.vehicle-description-input {
  width: 100%;
  min-height: 290px;
  resize: vertical;
  font-family: inherit;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vehicle-description-preview-card {
  min-height: 290px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.vehicle-description-preview-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.vehicle-description-preview-card h3 {
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: 22px;
}

.vehicle-description-preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vehicle-description-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.description-btn,
.featured-toggle-btn {
  background: #0b1020;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.description-btn i,
.featured-toggle-btn i {
  color: currentColor;
}

.featured-toggle-btn.is-featured {
  background: linear-gradient(135deg, #fff3b0, #f2c300);
  border-color: #d6a900;
  color: #5f4300;
  box-shadow:
    0 0 0 1px rgba(242, 195, 0, 0.35),
    0 8px 18px rgba(242, 195, 0, 0.22);
}

.featured-toggle-btn.is-featured i {
  color: #8a6400;
}

body[data-theme="black"] .featured-toggle-btn.is-featured,
body[data-theme="classic"] .featured-toggle-btn.is-featured {
  background: linear-gradient(135deg, #fff3b0, #f2c300);
  border-color: #f2c300;
  color: #4b3500;
  box-shadow:
    0 0 0 1px rgba(242, 195, 0, 0.55),
    0 0 18px rgba(242, 195, 0, 0.28);
}

body[data-theme="black"] .featured-toggle-btn.is-featured i,
body[data-theme="classic"] .featured-toggle-btn.is-featured i {
  color: #4b3500;
}

@media (max-width: 760px) {
  .vehicle-description-layout {
    grid-template-columns: 1fr;
  }
}

.description-btn,
.featured-toggle-btn {
  background: #0b1020;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.description-btn i,
.featured-toggle-btn i {
  color: currentColor;
}

.featured-toggle-btn.is-featured {
  background: linear-gradient(135deg, #fff3b0, #f2c300);
  border-color: #d6a900;
  color: #5f4300;
  box-shadow:
    0 0 0 1px rgba(242, 195, 0, 0.35),
    0 8px 18px rgba(242, 195, 0, 0.22);
}

.featured-toggle-btn.is-featured i {
  color: #8a6400;
}

body[data-theme="black"] .featured-toggle-btn.is-featured,
body[data-theme="classic"] .featured-toggle-btn.is-featured {
  background: linear-gradient(135deg, #fff3b0, #f2c300);
  border-color: #f2c300;
  color: #4b3500;
  box-shadow:
    0 0 0 1px rgba(242, 195, 0, 0.55),
    0 0 18px rgba(242, 195, 0, 0.28);
}

body[data-theme="black"] .featured-toggle-btn.is-featured i,
body[data-theme="classic"] .featured-toggle-btn.is-featured i {
  color: #4b3500;
}

.vehicle-description-input,
.vehicle-description-preview-card p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vehicle-description-input {
  font-family: inherit;
}

.vehicle-description-input,
.vehicle-description-preview-card p {
  font-family: inherit !important;
  font-size: 18px !important;
  line-height: 1.7 !important;
  color: var(--ink) !important;
}

.vehicle-description-preview-card p {
  white-space: normal !important;
}

.vehicle-description-input {
  padding: 14px !important;
}

.displayed-toggle-btn {
  position: relative;
  background: #191f2c !important;
  border: 2px solid #697386 !important;
  color: #aeb7c6 !important;
  box-shadow: none !important;
  opacity: 0.82;
}

.displayed-toggle-btn i {
  color: currentColor;
}

.displayed-toggle-btn.is-displayed {
  background: #16a34a !important;
  border-color: #86efac !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 2px rgba(22, 163, 74, 0.26),
    0 0 16px rgba(34, 197, 94, 0.34) !important;
  opacity: 1;
}

.displayed-toggle-btn.is-displayed i {
  color: #ffffff !important;
}

body[data-theme="black"] .displayed-toggle-btn.is-displayed,
body[data-theme="classic"] .displayed-toggle-btn.is-displayed {
  background: #16a34a !important;
  border-color: #86efac !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 2px rgba(22, 163, 74, 0.28),
    0 0 18px rgba(34, 197, 94, 0.38) !important;
}

body[data-theme="black"] .displayed-toggle-btn.is-displayed i,
body[data-theme="classic"] .displayed-toggle-btn.is-displayed i {
  color: #ffffff !important;
}

.vehicle-public-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.vehicle-public-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.vehicle-public-fields select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

#vehicleDescriptionPreviewFacts {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 850;
}

@media (max-width: 760px) {
  .vehicle-public-fields {
    grid-template-columns: 1fr;
  }
}

body[data-theme="black"] .gallery-actions .secondary,
body[data-theme="classic"] .gallery-actions .secondary {
  background: #050814;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="black"] .gallery-actions .secondary:hover,
body[data-theme="classic"] .gallery-actions .secondary:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.inventory-actions {
  gap: 7px;
}

.inventory-actions .vehicle-manager-btn {
  width: auto;
  min-width: 92px;
  padding: 0 10px;
}

.inventory-actions .vehicle-manager-btn span {
  display: inline;
}

.vehicle-manager-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.vehicle-manager-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 3px solid var(--yellow);
  background: var(--dark);
  color: #ffffff;
}

.vehicle-manager-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

.vehicle-manager-head p {
  margin: 4px 0 0;
  color: #d7d8df;
  font-size: 13px;
}

.vehicle-manager-body {
  padding: 18px;
}

.vehicle-manager-grid {
  display: grid;
  gap: 10px;
}

.vehicle-manager-card {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: var(--panel-2);
  color: var(--ink);
  text-align: left;
}

.vehicle-manager-card:hover {
  border-color: var(--yellow);
  transform: translateY(-1px);
}

.vehicle-manager-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--dark);
  color: var(--yellow);
}

.vehicle-manager-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.vehicle-manager-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-manager-card.danger i {
  background: #3b0f0a;
  color: #ffffff;
}

.vehicle-manager-card.danger:hover {
  border-color: var(--red);
}

body[data-theme="black"] .vehicle-manager-modal,
body[data-theme="classic"] .vehicle-manager-modal,
body[data-theme="black"] .vehicle-manager-card,
body[data-theme="classic"] .vehicle-manager-card {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="black"] .vehicle-manager-card strong,
body[data-theme="black"] .vehicle-manager-card small,
body[data-theme="classic"] .vehicle-manager-card strong,
body[data-theme="classic"] .vehicle-manager-card small {
  color: var(--ink);
}

@media (max-width: 760px) {
  .inventory-actions {
    flex-wrap: wrap;
  }

  .inventory-actions .vehicle-manager-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

.gallery-cell {
  display: none;
}

.vehicle-manager-back-btn {
  align-self: center;
}

.vehicle-manager-view {
  margin-bottom: 14px;
}

.vehicle-manager-help {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.vehicle-image-tile-actions {
  display: flex;
  gap: 6px;
  padding: 8px;
}

.vehicle-image-tile-actions button {
  flex: 1;
  min-width: 0;
}

.vehicle-manager-files {
  display: grid;
  gap: 12px;
}

.vehicle-manager-files-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.vehicle-manager-files-head strong,
.vehicle-manager-files-head span {
  display: block;
}

.vehicle-manager-files-head strong {
  color: var(--ink);
  font-weight: 900;
}

.vehicle-manager-files-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-manager-file-list {
  display: grid;
  gap: 8px;
}

.vehicle-manager-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.vehicle-manager-file-row button:first-child {
  justify-content: flex-start;
  min-width: 0;
}

.vehicle-manager-file-row button:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-manager-sale-panel {
  padding: 0;
}

.inventory-actions {
  justify-content: center;
}

.inventory-actions .icon-only-action {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.inventory-actions .icon-only-action i {
  margin: 0;
}

.vm-count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

#inventoryTableActive,
#inventoryTableSold {
  width: 100%;
  table-layout: fixed;
}

#inventoryTableActive .col-actions,
#inventoryTableSold .col-actions {
  width: 154px;
}

#inventoryTableActive th.actions-header,
#inventoryTableSold th.actions-header {
  text-align: center !important;
}

#inventoryTableActive td:nth-child(12),
#inventoryTableSold td:nth-child(12) {
  text-align: center !important;
}

#inventoryTableActive td:nth-child(12) .inventory-actions,
#inventoryTableSold td:nth-child(12) .inventory-actions {
  width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
}

.gallery-cell,
.docs-cell,
.gallery-header,
.docs-header {
  display: none !important;
}

.vehicle-manager-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.vehicle-manager-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vm-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  margin-left: 0;
  padding: 0 10px;
  border-radius: 999px;
  line-height: 1;
  vertical-align: middle;
}

#inventoryTableSold .col-actions {
  width: 154px;
}

#inventoryTableSold .sold-inventory-actions {
  gap: 7px;
}

.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--yellow) #050814;
}

.table-scroll::-webkit-scrollbar,
.vehicle-manager-modal::-webkit-scrollbar,
.admin-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track,
.vehicle-manager-modal::-webkit-scrollbar-track,
.admin-content::-webkit-scrollbar-track {
  background: #050814;
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb,
.vehicle-manager-modal::-webkit-scrollbar-thumb,
.admin-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--yellow), #b88f00);
  border: 2px solid #050814;
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover,
.vehicle-manager-modal::-webkit-scrollbar-thumb:hover,
.admin-content::-webkit-scrollbar-thumb:hover {
  background: var(--yellow);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--yellow) #050814;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
  background: #050814;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--yellow), #b88f00);
  border: 2px solid #050814;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover {
  background: var(--yellow);
}

.vm-count-pill {
  display: none !important;
}

.vehicle-manager-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.vm-count-badge {
  min-width: 34px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(242, 195, 0, 0.14);
  border: 1px solid rgba(242, 195, 0, 0.55);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

#activeContainer,
#soldContainer {
  overflow: hidden !important;
  border-radius: var(--radius);
}

#activeContainer > .table-scroll,
#soldContainer > .table-scroll {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  padding-right: 14px !important;
  padding-bottom: 22px !important;
  overflow: auto !important;
  border-radius: var(--radius);
  scrollbar-gutter: stable !important;
}

#inventoryTableActive,
#inventoryTableSold {
  width: 100% !important;
  margin-right: 0 !important;
}

#inventoryTableActive .col-actions {
  width: 124px !important;
}

#inventoryTableSold .col-actions {
  width: 128px !important;
}

#inventoryTableActive th.actions-header,
#inventoryTableSold th.actions-header,
#inventoryTableActive td:nth-child(12),
#inventoryTableSold td:nth-child(12) {
  text-align: center !important;
}

#inventoryTableActive td:nth-child(12) .inventory-actions,
#inventoryTableSold td:nth-child(12) .inventory-actions {
  width: 100%;
  justify-content: center !important;
  flex-wrap: nowrap !important;
}

#inventoryTableSold .sold-inventory-actions {
  gap: 5px !important;
}

#inventoryTableSold .sold-inventory-actions button {
  width: 34px !important;
  min-width: 34px !important;
}

.vehicle-expense-actions,
.business-expense-actions,
.personal-expense-actions,
.total-expense-actions,
.itemized-profit-actions,
.total-profit-actions {
  padding: 0 0 14px !important;
  margin: 0 0 12px !important;
  border-bottom: 1px solid var(--line);
}

.tot-exp-month-ledger {
  gap: 10px;
  padding: 0;
}

.tot-exp-month {
  border-radius: 10px;
  box-shadow: none;
}

.tot-exp-month summary {
  min-height: 46px !important;
  padding: 8px 12px !important;
  border-left: 4px solid var(--yellow);
}

.tot-exp-month summary > span {
  padding: 5px 8px;
}

.tot-exp-month-main strong {
  font-size: 15px !important;
}

.tot-exp-month summary strong {
  font-size: 13px;
}

.tot-exp-month summary > span:last-child strong {
  font-size: 15px;
}

.tot-prof-subhead,
.tot-prof-subrow {
  padding-left: 18px !important;
}

.tot-prof-subrow {
  min-height: 38px;
}

.veh-exp-ledger,
.biz-exp-ledger,
.oth-exp-ledger,
.tot-exp-ledger,
.itm-prof-ledger,
.tot-prof-ledger,
.tot-prof-grouped,
.tot-exp-month-ledger {
  background: transparent;
}

.veh-exp-empty,
.biz-exp-empty,
.oth-exp-empty,
.tot-exp-empty,
.itm-prof-empty,
.tot-prof-empty {
  width: 100%;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

body[data-theme="black"] .tot-exp-month summary,
body[data-theme="classic"] .tot-exp-month summary {
  background: var(--panel);
}

body[data-theme="black"] .tot-exp-month[open] summary,
body[data-theme="classic"] .tot-exp-month[open] summary {
  background: var(--panel-3);
}

.tot-prof-month-clean summary {
  grid-template-columns: minmax(260px, 1fr) 120px 120px 120px 140px !important;
}

.tot-prof-month-clean summary > span:nth-child(2),
.tot-prof-month-clean summary > span:nth-child(3),
.tot-prof-month-clean summary > span:nth-child(4) {
  opacity: 0.85;
}

.tot-prof-month-clean summary > span:nth-child(5) {
  background: rgba(4, 120, 87, 0.08);
}

@media (max-width: 1100px) {
  .tot-prof-month-clean summary {
    grid-template-columns: 1fr 130px !important;
  }

  .tot-prof-month-clean summary > span:nth-child(2),
  .tot-prof-month-clean summary > span:nth-child(3),
  .tot-prof-month-clean summary > span:nth-child(4) {
    display: none;
  }
}

#totProfList {
  padding: 0;
}

#totProfList > .tot-exp-month-ledger {
  gap: 0;
  padding: 0;
  background: transparent;
}

#totProfList .tot-exp-month.tot-prof-month-clean {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

#totProfList .tot-exp-month.tot-prof-month-clean:last-child {
  border-bottom: 0;
}

#totProfList .tot-prof-month-clean summary {
  min-height: 46px !important;
  grid-template-columns: minmax(300px, 1fr) 130px 130px 130px 140px !important;
  padding: 8px 12px !important;
  border-left: 0;
  background: var(--panel);
}

#totProfList .tot-prof-month-clean summary > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  background: transparent;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(2) {
  border-left: 3px solid var(--yellow);
}

#totProfList .tot-prof-month-clean summary > span:nth-child(3) {
  border-left: 3px solid #57d68d;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(4) {
  border-left: 3px solid #7c8aa5;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(5) {
  border-left: 3px solid var(--green);
}

#totProfList .tot-prof-month-clean summary > span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

#totProfList .tot-prof-month-clean summary > span strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

#totProfList .tot-prof-month-clean summary > span:last-child strong {
  font-size: 15px;
}

#totProfList .tot-prof-month-clean[open] summary {
  border-bottom: 1px solid var(--line);
}

#totProfList .tot-prof-subhead {
  padding: 9px 12px !important;
}

#totProfList .tot-prof-subrow {
  min-height: 40px;
  padding: 7px 12px !important;
}

body[data-theme="black"] #totProfList .tot-prof-month-clean summary,
body[data-theme="classic"] #totProfList .tot-prof-month-clean summary {
  background: #151c2d;
}

body[data-theme="black"] #totProfList .tot-prof-month-clean[open] summary,
body[data-theme="classic"] #totProfList .tot-prof-month-clean[open] summary {
  background: #1a2338;
}

@media (max-width: 1100px) {
  #totProfList .tot-prof-month-clean summary {
    grid-template-columns: 1fr 130px !important;
  }

  #totProfList .tot-prof-month-clean summary > span:nth-child(2),
  #totProfList .tot-prof-month-clean summary > span:nth-child(3),
  #totProfList .tot-prof-month-clean summary > span:nth-child(4) {
    display: none;
  }
}

#totProfList .tot-prof-month-clean summary {
  grid-template-columns: minmax(360px, 1fr) repeat(4, minmax(180px, 200px)) !important;
  gap: 18px !important;
}

#totProfList .tot-prof-month-clean summary > span:first-child {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 3px 8px !important;
  white-space: nowrap;
}

#totProfList .tot-prof-month-clean summary > span:not(:first-child) {
  min-width: 0;
  display: grid !important;
  grid-template-columns: auto minmax(90px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 3px 0 3px 10px !important;
  white-space: nowrap;
}

#totProfList .tot-prof-month-clean summary > span:not(:first-child) strong {
  text-align: right;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(2) {
  border-left: 3px solid var(--yellow) !important;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(3) {
  border-left: 3px solid #57d68d !important;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(4) {
  border-left: 3px solid #7c8aa5 !important;
}

#totProfList .tot-prof-month-clean summary > span:nth-child(5) {
  border-left: 3px solid var(--green) !important;
}

#totExpList .tot-exp-month-ledger {
  gap: 0 !important;
}

#totExpList .tot-exp-month {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#totExpList .tot-exp-month:last-child {
  border-bottom: 0 !important;
}

#totExpList .tot-exp-month summary {
  border-left: 0 !important;
}

#totExpList .tot-exp-month {
  border-left: 0 !important;
}

#totExpList .tot-exp-month {
  border-left: 0 !important;
}

#totExpList .tot-exp-month summary {
  border-left: 0 !important;
}

#vehExpStats,
#bizExpStats,
#othExpStats,
#totExpStats,
#itmProfStats,
#totProfStats {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  margin: 12px 0 14px !important;
}

#vehExpStats > div,
#bizExpStats > div,
#othExpStats > div,
#totExpStats > div,
#itmProfStats > div,
#totProfStats > div {
  min-height: 76px !important;
  display: grid !important;
  align-content: center !important;
  gap: 5px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow-soft) !important;
}

#vehExpStats span,
#bizExpStats span,
#othExpStats span,
#totExpStats span,
#itmProfStats span,
#totProfStats span {
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.65px !important;
}

#vehExpStats strong,
#bizExpStats strong,
#othExpStats strong,
#totExpStats strong,
#itmProfStats strong,
#totProfStats strong {
  color: var(--ink) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

#vehExpStats strong.money,
#bizExpStats strong.money,
#othExpStats strong.money,
#totExpStats strong.money,
#itmProfStats strong.money,
#totProfStats strong.money {
  color: var(--green) !important;
}

@media (max-width: 1100px) {
  #vehExpStats,
  #bizExpStats,
  #othExpStats,
  #totExpStats,
  #itmProfStats,
  #totProfStats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

#vehExpExportCsvBtn,
#bizExpExportCsvBtn,
#othExpExportCsvBtn,
#totExpExportCsvBtn {
  margin-left: auto !important;
}

#bizExpAddPresetBtn {
  margin-left: 0 !important;
}

.report-summary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  gap: 14px;
}

.report-title-stack {
  min-width: 0;
}

.report-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 750;
}

.report-heading-actions {
  gap: 14px;
  min-width: 0;
}

.report-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.report-search-wrap {
  width: min(430px, 34vw);
  min-width: 260px;
}

.report-search-wrap input {
  min-height: 38px;
  border-radius: 999px;
  padding-left: 15px;
  background: #050814;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.report-search-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.report-search-wrap input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(242, 195, 0, 0.14);
}

.report-toolbar .toolbar-icon-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
}

.summary-panel .actions.report-filter-row,
.vehicle-expense-actions.report-filter-row,
.business-expense-actions.report-filter-row,
.personal-expense-actions.report-filter-row,
.total-expense-actions.report-filter-row {
  width: 100%;
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0 10px;
}

.report-filter-row label {
  margin: 0;
}

.report-filter-row select {
  width: auto;
  min-width: 170px;
  max-width: 220px;
}

.report-filter-row button {
  min-height: 36px;
}

.report-data-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-data-actions .primary,
.report-data-actions .secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 1100px) {
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .report-heading-actions {
    width: 100%;
    justify-self: stretch;
    justify-content: space-between;
  }

  .report-toolbar {
    flex: 1;
  }

  .report-search-wrap {
    width: 100%;
    min-width: 220px;
  }
}

@media (max-width: 760px) {
  .report-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .report-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    width: 100%;
  }

  .report-search-wrap {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .report-search-wrap input {
    border-radius: 12px;
  }

  .summary-panel .actions.report-filter-row,
  .vehicle-expense-actions.report-filter-row,
  .business-expense-actions.report-filter-row,
  .personal-expense-actions.report-filter-row,
  .total-expense-actions.report-filter-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-2);
  }

  .report-filter-row label {
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.8px;
  }

  .report-filter-row select,
  .report-filter-row button {
    width: 100%;
    max-width: none;
    min-height: 44px;
  }

  .report-data-actions {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #otherExpensesPanel .report-data-actions {
    grid-template-columns: 1fr;
  }

  .report-data-actions button {
    width: 100%;
    justify-content: center;
  }
}


.inventory-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(520px, auto) !important;
  align-items: start !important;
}

.inventory-toolbar {
  width: auto !important;
  min-width: 0 !important;
  justify-self: end !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.section-toolbar {
  width: auto !important;
  min-width: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.section-toolbar.is-active {
  display: grid !important;
  grid-template-columns: minmax(320px, 540px) auto auto auto !important;
  justify-content: end !important;
}

.section-toolbar-inventory.is-active {
  grid-template-columns: minmax(320px, 540px) auto auto auto !important;
}

.section-toolbar .search-wrap,
.section-toolbar .report-search-wrap {
  width: 100% !important;
  min-width: 0 !important;
}

.section-toolbar .search-wrap input,
.section-toolbar .report-search-wrap input {
  width: 100% !important;
}

@media (max-width: 900px) {
  .inventory-header {
    grid-template-columns: 1fr !important;
  }

  .inventory-toolbar {
    width: 100% !important;
    justify-self: stretch !important;
  }

  .section-toolbar.is-active,
  .section-toolbar-inventory.is-active {
    width: 100% !important;
    grid-template-columns: 1fr auto auto auto !important;
  }

  .section-toolbar .search-wrap,
  .section-toolbar .report-search-wrap {
    grid-column: 1 / -1 !important;
  }
}

#soldContainer {
  padding: 14px !important;
}

#soldContainer .sold-toolbar-main {
  display: none !important;
}

#soldContainer #setSoldRootBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  background: #225f41 !important;
  border-color: #4fc282 !important;
  color: #ffffff !important;
}

#soldContainer #setSoldRootBtn:hover {
  background: #2b7952 !important;
  border-color: #7de0a7 !important;
}

#soldContainer #soldRootLabel {
  max-width: 220px !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: var(--panel-2) !important;
  color: var(--muted) !important;
  font-weight: 850 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#soldContainer #soldRootLabel.is-ready {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line)) !important;
  color: var(--green) !important;
}

#soldContainer #soldRootLabel.needs-permission {
  border-color: color-mix(in srgb, var(--yellow) 60%, var(--line)) !important;
  color: var(--yellow) !important;
}

#soldContainer .sold-toolbar-filters {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  flex-wrap: wrap !important;
  padding: 2px 0 14px !important;
  margin: 0 0 12px !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

#soldContainer .sold-toolbar-filters label {
  margin: 0 !important;
}

#soldContainer .sold-toolbar-filters select {
  width: auto !important;
  min-width: 190px !important;
  max-width: 230px !important;
}

#soldContainer #clearSoldFilterBtn {
  width: auto !important;
  min-width: 74px !important;
  justify-content: center !important;
}

#soldContainer .sold-folder-control {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
}

#soldContainer .table-scroll {
  border-radius: var(--radius-sm) !important;
  background: var(--panel-2) !important;
}

.inventory-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
}

.inventory-toolbar {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  justify-self: end !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.section-toolbar {
  width: auto !important;
  min-width: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.section-toolbar.is-active {
  width: auto !important;
  display: grid !important;
  grid-template-columns: minmax(420px, 610px) auto auto auto !important;
  justify-content: end !important;
}

.section-toolbar-inventory.is-active {
  grid-template-columns: minmax(420px, 610px) auto auto auto !important;
}

.section-toolbar .search-wrap,
.section-toolbar .report-search-wrap {
  width: 100% !important;
  min-width: 0 !important;
}

.section-toolbar .search-wrap input,
.section-toolbar .report-search-wrap input {
  width: 100% !important;
}

@media (max-width: 900px) {
  .inventory-header {
    grid-template-columns: 1fr !important;
  }

  .inventory-toolbar {
    width: 100% !important;
    justify-self: stretch !important;
  }

  .section-toolbar.is-active,
  .section-toolbar-inventory.is-active {
    width: 100% !important;
    grid-template-columns: 1fr auto auto auto !important;
  }

  .section-toolbar .search-wrap,
  .section-toolbar .report-search-wrap {
    grid-column: 1 / -1 !important;
  }
}

.section-toolbar-profit.is-active {
  grid-template-columns: minmax(420px, 610px) auto auto !important;
}

.itemized-profit-actions.report-filter-row,
.total-profit-actions.report-filter-row {
  width: 100%;
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0 14px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.itemized-profit-actions.report-filter-row label,
.total-profit-actions.report-filter-row label {
  margin: 0;
}

.itemized-profit-actions.report-filter-row select,
.total-profit-actions.report-filter-row select {
  width: auto;
  min-width: 190px;
  max-width: 240px;
}

.itemized-profit-actions.report-filter-row button,
.total-profit-actions.report-filter-row button {
  min-width: 74px;
}

@media (max-width: 900px) {
  .section-toolbar-profit.is-active {
    grid-template-columns: 1fr auto auto !important;
  }

  .itemized-profit-actions.report-filter-row,
  .total-profit-actions.report-filter-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-2);
  }

  .itemized-profit-actions.report-filter-row select,
  .total-profit-actions.report-filter-row select,
  .itemized-profit-actions.report-filter-row button,
  .total-profit-actions.report-filter-row button {
    width: 100%;
    max-width: none;
    min-height: 44px;
  }
}

.vehicle-manager-gallery {
  display: grid;
  gap: 14px;
}

.vehicle-manager-gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.vehicle-manager-gallery-tools {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.vehicle-manager-gallery-tools button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.vehicle-manager-gallery-tools .is-active {
  background: rgba(242, 195, 0, 0.16);
  color: var(--yellow);
  border-color: rgba(242, 195, 0, 0.75);
}

.vehicle-image-tile {
  position: relative;
}

.vehicle-image-tile.is-primary {
  border-color: rgba(242, 195, 0, 0.75);
  box-shadow: 0 0 0 2px rgba(242, 195, 0, 0.14);
}

.vehicle-image-position-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.vehicle-image-tile.is-primary .vehicle-image-position-badge {
  background: var(--yellow);
  color: #111827;
  border-color: var(--yellow);
}

.vehicle-images-grid.is-reordering .vehicle-image-tile-actions {
  display: grid;
  grid-template-columns: 42px 42px minmax(94px, 1fr) 42px;
  gap: 7px;
  align-items: center;
  padding: 9px;
}

.vehicle-images-grid.is-reordering .vehicle-image-tile-actions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.vehicle-image-primary-btn {
  padding-left: 10px;
  padding-right: 10px;
}

.vehicle-image-primary-btn span {
  display: inline;
}

.vehicle-image-tile-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 760px) {
  .vehicle-manager-gallery-head {
    grid-template-columns: 1fr;
  }

  .vehicle-manager-gallery-tools {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .vehicle-manager-gallery-tools button {
    width: 100%;
    justify-content: center;
  }

  .vehicle-images-grid.is-reordering .vehicle-image-tile-actions {
    grid-template-columns: 1fr 1fr;
  }

  .vehicle-image-primary-btn {
    grid-column: 1 / -1;
  }
}


.vehicle-images-grid.is-reordering .vehicle-image-tile {
  cursor: grab;
}

.vehicle-images-grid.is-reordering .vehicle-image-tile:active {
  cursor: grabbing;
}

.vehicle-image-tile.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}



.vehicle-image-drag-hint {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  pointer-events: none;
}

.vehicle-image-drag-hint i {
  font-size: 10px;
}


.vehicle-images-grid.is-reordering .vehicle-image-tile {
  overflow: visible;
}

.vehicle-image-tile.is-drop-before::before,
.vehicle-image-tile.is-drop-after::after {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  z-index: 8;
  width: 5px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow:
    0 0 0 3px rgba(242, 195, 0, 0.18),
    0 0 18px rgba(242, 195, 0, 0.55);
  pointer-events: none;
}

.vehicle-image-tile.is-drop-before::before {
  left: -9px;
}

.vehicle-image-tile.is-drop-after::after {
  right: -9px;
}

.vehicle-image-tile.is-drop-before,
.vehicle-image-tile.is-drop-after {
  border-color: rgba(242, 195, 0, 0.75);
}

@media (max-width: 760px) {
  .vehicle-image-tile.is-drop-before::before,
  .vehicle-image-tile.is-drop-after::after {
    top: -6px;
    bottom: -6px;
    width: 4px;
  }

  .vehicle-image-tile.is-drop-before::before {
    left: -6px;
  }

  .vehicle-image-tile.is-drop-after::after {
    right: -6px;
  }
}


.vehicle-manager-gallery .vehicle-images-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  gap: 16px;
  overflow: visible;
}

.vehicle-manager-gallery .vehicle-image-tile {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  background: var(--panel-2);
}

.vehicle-manager-gallery .vehicle-image-preview {
  width: 100%;
  height: clamp(210px, 28vw, 275px);
  min-height: 0;
  display: block;
  border-radius: 0;
}

.vehicle-manager-gallery .vehicle-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.vehicle-manager-gallery .vehicle-images-grid.is-reordering .vehicle-image-tile {
  overflow: hidden;
}

.vehicle-manager-gallery .vehicle-image-tile-actions {
  position: static;
  display: grid !important;
  grid-template-columns: 44px 44px minmax(104px, 1fr) 44px !important;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 20, 0.24);
}

.vehicle-manager-gallery .vehicle-image-tile-actions button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vehicle-manager-gallery .vehicle-image-primary-btn {
  padding-left: 10px;
  padding-right: 10px;
}

.vehicle-manager-gallery .vehicle-image-primary-btn span {
  display: inline;
}

.vehicle-image-drag-handle {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 5;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.vehicle-image-drag-handle:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.vehicle-image-drag-handle:active {
  cursor: grabbing;
}

.vehicle-image-drag-handle i {
  font-size: 11px;
  pointer-events: none;
}

.vehicle-image-drag-handle span {
  pointer-events: none;
}

.vehicle-image-tile.is-dragging {
  opacity: 0.45;
  transform: scale(0.985);
}

.vehicle-manager-gallery .vehicle-image-tile.is-drop-before::before,
.vehicle-manager-gallery .vehicle-image-tile.is-drop-after::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  z-index: 9;
  width: 5px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow:
    0 0 0 3px rgba(242, 195, 0, 0.18),
    0 0 18px rgba(242, 195, 0, 0.55);
  pointer-events: none;
}

.vehicle-manager-gallery .vehicle-image-tile.is-drop-before::before {
  left: 6px;
}

.vehicle-manager-gallery .vehicle-image-tile.is-drop-after::after {
  right: 6px;
}

.vehicle-manager-gallery .vehicle-image-tile.is-drop-before,
.vehicle-manager-gallery .vehicle-image-tile.is-drop-after {
  border-color: rgba(242, 195, 0, 0.9);
}

@media (max-width: 760px) {
  .vehicle-manager-gallery .vehicle-images-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-manager-gallery .vehicle-image-preview {
    height: 230px;
  }

  .vehicle-manager-gallery .vehicle-image-tile-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .vehicle-manager-gallery .vehicle-image-primary-btn {
    grid-column: 1 / -1;
  }
}


.vehicle-manager-modal {
  width: min(980px, calc(100vw - 32px));
}

.vehicle-manager-body {
  max-height: calc(100vh - 170px);
  overflow: auto;
  overscroll-behavior: contain;
}

.vehicle-manager-gallery .vehicle-images-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.vehicle-manager-gallery .vehicle-image-preview {
  height: clamp(160px, 20vw, 210px) !important;
}

.vehicle-image-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 8, 18, 0.68);
  backdrop-filter: blur(4px);
}

.vehicle-image-upload-overlay[hidden] {
  display: none;
}

.vehicle-image-upload-status {
  display: flex;
  width: min(430px, 100%);
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.32);
}

.vehicle-image-upload-status > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.vehicle-image-upload-status strong,
.vehicle-image-upload-status small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-image-upload-status strong {
  font-size: 16px;
  font-weight: 900;
}

.vehicle-image-upload-status small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.vehicle-image-upload-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 4px solid color-mix(in srgb, var(--yellow) 25%, transparent);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: vehicle-image-upload-spin 0.8s linear infinite;
}

@keyframes vehicle-image-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-image-upload-spinner {
    animation-duration: 1.8s;
  }
}

.vehicle-manager-gallery .vehicle-image-tile-actions {
  grid-template-columns: 38px 38px minmax(88px, 1fr) 38px !important;
  gap: 7px !important;
  padding: 8px !important;
}

.vehicle-manager-gallery .vehicle-image-tile-actions button {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 9px !important;
}

.vehicle-manager-gallery .vehicle-image-primary-btn {
  font-size: 12px !important;
}

.vehicle-image-position-badge,
.vehicle-image-drag-handle {
  min-height: 24px !important;
  padding: 4px 9px !important;
  font-size: 10px !important;
}

@media (max-width: 860px) {
  .vehicle-manager-gallery .vehicle-images-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .vehicle-manager-gallery .vehicle-image-preview {
    height: 175px !important;
  }
}

@media (max-width: 560px) {
  .vehicle-manager-gallery .vehicle-images-grid {
    grid-template-columns: 1fr !important;
  }

  .vehicle-manager-gallery .vehicle-image-preview {
    height: 215px !important;
  }

  .vehicle-manager-modal button,
  .vehicle-manager-gallery-tools button,
  .vehicle-images-input {
    min-height: 44px !important;
  }
}

/* The only desktop sizing contract now lives with Leon's Original theme.
   Keeping column widths out of this shared layer prevents percentage rules
   from fighting the strict character-based layout in admin-legacy.css. */

.customer-view-btn[hidden] {
  display: none !important;
}

#inventoryTableActive.table-hide-purchase col:nth-child(6),
#inventoryTableActive.table-hide-purchase th:nth-child(6),
#inventoryTableActive.table-hide-purchase tr.data-row > td:nth-child(6),
#inventoryTableActive.table-hide-expenses col:nth-child(7),
#inventoryTableActive.table-hide-expenses th:nth-child(7),
#inventoryTableActive.table-hide-expenses tr.data-row > td:nth-child(7),
#inventoryTableActive.table-hide-profit col:nth-child(11),
#inventoryTableActive.table-hide-profit th:nth-child(11),
#inventoryTableActive.table-hide-profit tr.data-row > td:nth-child(11),
#inventoryTableActive.table-hide-tco col:nth-child(8),
#inventoryTableActive.table-hide-tco th:nth-child(8),
#inventoryTableActive.table-hide-tco tr.data-row > td:nth-child(8) {
  display: none !important;
}

#inventoryTableActive.cv-compact {
  width: 100% !important;
  min-width: 0 !important;
}

#inventoryTableActive.cv-compact col:nth-child(1) {
  width: 6% !important;
}

#inventoryTableActive.cv-compact col:nth-child(2) {
  width: 9% !important;
}

#inventoryTableActive.cv-compact col:nth-child(3) {
  width: 13% !important;
}

#inventoryTableActive.cv-compact col:nth-child(4),
#inventoryTableActive.cv-compact col:nth-child(5) {
  width: 11% !important;
}

#inventoryTableActive.cv-compact col:nth-child(9) {
  width: 15% !important;
}

#inventoryTableActive.cv-compact col:nth-child(10) {
  width: 22% !important;
}

#inventoryTableActive.cv-compact col:nth-child(12) {
  width: 13% !important;
}

#customerViewToggleBtn[aria-pressed="true"] {
  background: var(--yellow);
  color: #111827;
  border-color: var(--yellow);
  box-shadow:
    0 0 0 2px var(--panel),
    0 0 0 4px rgba(250, 204, 21, 0.8),
    0 0 18px rgba(250, 204, 21, 0.42);
}

/* Monthly Report has actions but intentionally no search field. */
.section-toolbar-monthly.is-active {
  grid-template-columns: repeat(2, auto) !important;
}
