:root {
  --tblr-font-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tblr-primary: #206bc4;
}

body {
  font-family: var(--tblr-font-sans-serif);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.list-card,
.stat-card,
.login-card {
  animation: rise 0.35s ease both;
  color: inherit;
  text-decoration: none;
}

.list-card,
.stat-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.list-card:hover,
.stat-card:hover,
.list-card:focus-visible,
.stat-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--tblr-box-shadow-lg);
  color: inherit;
}

.list-card .btn,
.stat-card .card-footer {
  pointer-events: none;
}

.stat-card .card-footer {
  font-weight: 600;
  color: var(--tblr-primary);
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--tblr-bg-surface-secondary);
  flex: none;
}

.thumb-lg {
  width: 84px;
  height: 84px;
}

.product-photo {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: var(--tblr-bg-surface-secondary);
}

.product-photo-empty {
  display: grid;
  place-items: center;
  color: var(--tblr-secondary);
}

.raw {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  max-height: 280px;
  overflow: auto;
}

details.card > summary {
  cursor: pointer;
  list-style: none;
}

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

.sticky-actions {
  position: sticky;
  bottom: 12px;
  z-index: 20;
}

.sticky-actions .btn {
  box-shadow: var(--tblr-box-shadow-lg);
}

.filter-bar .btn {
  border-radius: 999px;
}

.status-new, .status-planned { --st: #1d4ed8; }
.status-thinking, .status-in_progress { --st: #d97706; }
.status-called, .status-measure { --st: #0891b2; }
.status-out_of_stock, .status-paused { --st: #ea580c; }
.status-shipped, .status-done { --st: #15803d; }
.status-refused { --st: #dc2626; }
.status-warranty { --st: #7c3aed; }

.badge.status {
  background: color-mix(in srgb, var(--st) 16%, white);
  color: color-mix(in srgb, var(--st) 78%, black);
  border: 1px solid color-mix(in srgb, var(--st) 42%, white);
  font-weight: 650;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--st, currentColor);
  display: inline-block;
  flex: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: color-mix(in srgb, var(--st) 10%, white);
  border-color: color-mix(in srgb, var(--st) 45%, white);
  color: color-mix(in srgb, var(--st) 82%, black);
}

.status-chip.on {
  background: var(--st);
  border-color: var(--st);
  color: #fff;
}

.status-chip.on .status-dot {
  background: #fff;
}

.progress-bar.status-new,
.progress-bar.status-thinking,
.progress-bar.status-called,
.progress-bar.status-out_of_stock,
.progress-bar.status-shipped,
.progress-bar.status-refused {
  background: var(--st);
}

.status-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--st) 45%, white);
  background: color-mix(in srgb, var(--st) 12%, white);
  color: color-mix(in srgb, var(--st) 82%, black);
  cursor: pointer;
  font-weight: 600;
}

.status-choice {
  position: relative;
}

.status-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.status-choice:has(input:checked) {
  background: var(--st);
  border-color: var(--st);
  color: #fff;
}

.status-choice:has(input:checked) .status-dot {
  background: #fff;
}

@keyframes rise {
  from { transform: translateY(6px); }
  to { transform: none; }
}

.navbar-nav > .nav-item > .nav-link .badge,
.navbar-nav > .nav-item > .nav-link .nav-chevron {
  margin-left: auto;
}
.navbar-nav > .nav-item > .nav-link .badge + .nav-chevron {
  margin-left: 0.55rem;
}
.nav-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  flex: none;
}
.nav-link[aria-expanded="true"] .nav-chevron {
  transform: rotate(-135deg);
}
.nav-sub {
  margin: 0.15rem 0 0.45rem;
  padding-left: 2.15rem;
}
.nav-sub .nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 8px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

#sidebar-menu .offcanvas-body {
  min-height: 0;
}
#sidebar-menu .offcanvas-body > .navbar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#sidebar-menu .offcanvas-body > .mt-auto {
  flex: none;
}

@media (min-width: 992px) {
  .navbar-vertical #sidebar-menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
  .navbar-vertical #sidebar-menu .offcanvas-body {
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }
}

@media (max-width: 991.98px) {
  #sidebar-menu.offcanvas-start {
    width: min(20rem, 86vw);
  }
  #sidebar-menu .offcanvas-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #sidebar-menu .nav-link {
    min-height: 48px;
    font-size: 16px;
  }
  .page-actions .btn,
  .filter-bar .btn {
    min-height: 40px;
  }
}

@media (max-width: 767.98px) {
  .page-actions .btn {
    width: 100%;
  }
  .page-title {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .list-card,
  .stat-card,
  .login-card {
    animation: none;
    transition: none;
  }
}
