.bt-header {
  background: #131921;
  color: #fff;
}

:root {
  --bt-accent: #ff8500;
  --bt-accent-rgb: 255, 133, 0;
}

.bt-subheader {
  background: #232f3e;
  color: #fff;
}

html[data-theme="dark"] body {
  background-color: #0f1115 !important;
  color: #e8eaed;
}

html[data-theme="dark"] .bg-light {
  background-color: #0f1115 !important;
}

html[data-theme="dark"] .bg-white {
  background-color: #151a20 !important;
  color: #e8eaed;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start,
html[data-theme="dark"] .border-end {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .text-muted {
  color: rgba(232, 234, 237, 0.7) !important;
}

html[data-theme="dark"] .table {
  --bs-table-color: #e8eaed;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: #0f1115;
  border-color: rgba(255, 255, 255, 0.18);
  color: #e8eaed;
}

html[data-theme="dark"] .form-control::placeholder {
  color: rgba(232, 234, 237, 0.55);
}

html[data-theme="dark"] .card {
  background-color: #151a20;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .card .h5,
html[data-theme="dark"] .card .h4,
html[data-theme="dark"] .card .h3,
html[data-theme="dark"] .card .h2,
html[data-theme="dark"] .card .h1 {
  color: #fff;
}

html[data-theme="dark"] .card .small,
html[data-theme="dark"] .card .form-text,
html[data-theme="dark"] .card .text-muted {
  color: rgba(232, 234, 237, 0.8) !important;
}

html[data-theme="dark"] .card .form-label {
  color: #fff;
}

html[data-theme="dark"] .text-dark {
  color: #fff !important;
}

html[data-theme="dark"] .bt-price {
  color: #fff !important;
}

html[data-theme="dark"] .bt-cart {
  color: rgb(var(--bt-accent-rgb)) !important;
}

html[data-theme="dark"] .bt-cart:hover {
  color: rgb(var(--bt-accent-rgb)) !important;
  text-decoration: underline;
}

html[data-theme="dark"] .btn-outline-secondary {
  color: rgba(232, 234, 237, 0.9);
  border-color: rgba(232, 234, 237, 0.35);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
  color: #e8eaed;
  background-color: rgba(232, 234, 237, 0.12);
  border-color: rgba(232, 234, 237, 0.45);
}

html[data-theme="dark"] .offcanvas {
  background-color: #151a20;
  color: #e8eaed;
}

html[data-theme="dark"] .offcanvas .btn-close {
  filter: invert(1) grayscale(100%);
}

html[data-theme="dark"] .list-group-item {
  background-color: transparent;
  color: #e8eaed;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus {
  background-color: rgba(232, 234, 237, 0.08);
  color: #e8eaed;
}

.bt-logo {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.bt-logo:hover {
  color: #fff;
}

.bt-logo-img {
  height: 28px;
  width: auto;
  display: block;
  flex: 0 0 auto;
  max-width: var(--bt-logo-max-width, 300px);
  object-fit: contain;
}

.bt-app-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.bt-logo-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.bt-logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bt-logo-text {
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.bt-logo--img .bt-logo-text {
  display: none;
}

.bt-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.bt-link:hover {
  text-decoration: underline;
  color: #fff;
}

.bt-theme-toggle {
  white-space: nowrap;
}

.bt-theme-toggle .bt-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.bt-hamburger .bt-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.bt-thumb {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px;
  max-height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f6f7;
  display: block;
}

.bt-sort-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bt-sort-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  user-select: none;
}

html[data-theme="dark"] .bt-sort-item {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(21, 26, 32, 0.9);
}

.bt-sort-item:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .bt-sort-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.bt-sort-handle {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
  cursor: grab;
}

.bt-sort-dragging {
  opacity: 0.6;
}

.bt-settings-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  --bt-grid-row: 120px;
  grid-auto-rows: var(--bt-grid-row);
}

.bt-settings-card {
  grid-column: span var(--w, 6);
  grid-row: span var(--h, 1);
  min-width: 0;
  position: relative;
}

@media (max-width: 767.98px) {
  .bt-settings-card {
    grid-column: span 12 !important;
  }
}

.bt-card-drag-handle {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
  cursor: grab;
  user-select: none;
}

html[data-theme="dark"] .bt-card-drag-handle,
html[data-theme="dark"] .bt-sort-handle {
  color: #fff;
}

.bt-card-resize-handle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  opacity: 0.6;
  background: linear-gradient(135deg, transparent 55%, rgba(0, 0, 0, 0.35) 56%, rgba(0, 0, 0, 0.35) 70%, transparent 71%);
}

html[data-theme="dark"] .bt-card-resize-handle {
  background: linear-gradient(135deg, transparent 55%, rgba(255, 255, 255, 0.35) 56%, rgba(255, 255, 255, 0.35) 70%, transparent 71%);
}

.bt-settings-card.bt-card-dragging {
  opacity: 0.6;
}

.bt-settings-card.bt-card-resizing {
  opacity: 0.9;
}

.bt-chat-box {
  height: 55vh;
  overflow-y: auto;
  padding: 0.25rem;
}

.bt-chat-row {
  display: flex;
  margin-bottom: 0.5rem;
}

.bt-chat-row--self {
  justify-content: flex-end;
}

.bt-chat-bubble {
  max-width: 78%;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.bt-chat-row--self .bt-chat-bubble {
  background: rgba(var(--bt-accent-rgb), 0.12);
  border-color: rgba(var(--bt-accent-rgb), 0.35);
}

html[data-theme="dark"] .bt-chat-bubble {
  background: rgba(21, 26, 32, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .bt-chat-row--self .bt-chat-bubble {
  background: rgba(var(--bt-accent-rgb), 0.14);
  border-color: rgba(var(--bt-accent-rgb), 0.35);
}

.bt-chat-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.bt-chat-fab {
  position: fixed;
  right: var(--bt-chat-fab-right, max(32px, env(safe-area-inset-right))) !important;
  left: var(--bt-chat-fab-left, auto) !important;
  bottom: var(--bt-chat-fab-bottom, max(32px, env(safe-area-inset-bottom))) !important;
  padding: 0 14px;
  min-width: var(--bt-chat-fab-size, 52px);
  height: var(--bt-chat-fab-size, 52px);
  border-radius: 999px;
  background: var(--bt-chat-fab-bg, var(--bt-accent));
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 1060;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  animation: bt-fab-pulse 2.2s ease-in-out infinite;
  border: 0;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
}

@media (max-width: 575.98px) {
  .bt-chat-fab {
    right: var(--bt-chat-fab-right-mobile, max(16px, env(safe-area-inset-right))) !important;
    left: var(--bt-chat-fab-left-mobile, auto) !important;
    bottom: var(--bt-chat-fab-bottom-mobile, max(16px, env(safe-area-inset-bottom))) !important;
  }
}

.bt-chat-fab:hover,
.bt-chat-fab:focus {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  filter: brightness(0.95);
}

.bt-chat-fab .bt-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.bt-chat-fab-text {
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

@keyframes bt-fab-pulse {
  0% { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(var(--bt-accent-rgb), 0.55); }
  70% { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), 0 0 0 14px rgba(var(--bt-accent-rgb), 0); }
  100% { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(var(--bt-accent-rgb), 0); }
}

.bt-chat-modal .modal-dialog {
  position: fixed;
  right: var(--bt-chat-fab-right, 32px);
  left: var(--bt-chat-fab-left, auto);
  bottom: var(--bt-chat-fab-bottom, 32px);
  margin: 0;
  width: min(420px, calc(100vw - 64px));
  max-height: min(70vh, 640px);
}

.bt-chat-modal .modal-content {
  border-radius: 14px;
  overflow: hidden;
}

.bt-chat-modal .modal-body {
  padding: 0.75rem;
}

.bt-chat-modal .modal-footer {
  padding: 0.75rem;
}

.bt-chat-modal .bt-chat-box {
  height: 46vh;
}

.bt-chat-modal.fade .modal-dialog {
  transform: translateX(120px);
  transition: transform 220ms ease;
}

.bt-chat-modal.show .modal-dialog {
  transform: translateX(0);
}

html[data-theme="dark"] .bt-chat-modal .modal-content {
  background-color: #151a20;
  color: #e8eaed;
}

html[data-theme="dark"] .bt-chat-modal .modal-header,
html[data-theme="dark"] .bt-chat-modal .modal-footer {
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .bt-chat-modal .btn-close {
  filter: invert(1) grayscale(100%);
}

.bt-cart {
  color: #fff;
}

.bt-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bt-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bt-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f5f5f5;
}

.card {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.card:hover .bt-card-img {
  transform: scale(1.03);
}

.bt-card-img {
  transition: transform 200ms ease;
}

.card .btn {
  position: relative;
  z-index: 2;
}

.bt-admin-sidebar {
  position: sticky;
  top: 1rem;
}

.bt-nav-pill {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid transparent;
}

.bt-nav-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.bt-hero {
  background: radial-gradient(1200px 420px at 10% 10%, rgba(var(--bt-accent-rgb), 0.25), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff, #f7f7f7);
}

.btn-warning {
  --bs-btn-bg: var(--bt-accent);
  --bs-btn-border-color: var(--bt-accent);
  --bs-btn-hover-bg: var(--bt-accent);
  --bs-btn-hover-border-color: var(--bt-accent);
  --bs-btn-active-bg: var(--bt-accent);
  --bs-btn-active-border-color: var(--bt-accent);
}

.btn-warning:hover,
.btn-warning:focus {
  filter: brightness(0.92);
}

.bt-hero-carousel .carousel-indicators [data-bs-target] {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.bt-hero-slide {
  min-height: 360px;
  background-size: cover;
  background-position: center;
}

.bt-hero-overlay {
  min-height: 360px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 45%, rgba(255, 255, 255, 0.45) 65%, rgba(255, 255, 255, 0.12) 100%);
}

.bt-hero-title,
.bt-hero-subtitle {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.bt-hero-carousel .carousel-control-prev-icon,
.bt-hero-carousel .carousel-control-next-icon {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.bt-hero-inner {
  background: linear-gradient(90deg, rgba(19, 25, 33, 0.06), rgba(19, 25, 33, 0));
}

.bt-hero-kicker {
  letter-spacing: 0.12em;
  color: #232f3e;
}

@media (max-width: 575.98px) {
  .bt-logo--img {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .bt-logo-text {
    font-size: 0.95rem;
  }

  .bt-logo-img,
  .bt-logo-icon {
    height: 24px;
    width: 24px;
  }

  .bt-logo-img {
    max-width: min(var(--bt-logo-max-width, 120px), 96px);
  }

  .bt-card-img {
    height: 150px;
  }

  .bt-hero-slide,
  .bt-hero-overlay {
    min-height: 260px;
  }

  .bt-hero-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 55%, rgba(255, 255, 255, 0.2) 100%);
  }

  .bt-nav-pill {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }
}

.bt-hero-card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bt-mini-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
}

.bt-cat-img-wrap {
  height: 150px;
  overflow: hidden;
}

.bt-cat-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.list-group-item.disabled {
  opacity: 0.6;
}

@media (max-width: 991.98px) {
  .bt-hero-slide,
  .bt-hero-overlay {
    min-height: 320px;
  }

  .bt-hero-carousel .carousel-control-prev,
  .bt-hero-carousel .carousel-control-next {
    display: none;
  }
}
