html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  margin: 0;
}

/* Login */
.login-body {
  min-height: 100vh;
  background: #1b6ca8;
}

@media (min-width: 576px) {
  .login-body {
    background: linear-gradient(145deg, #0d3b66 0%, #1b6ca8 45%, #f4f7fb 45%);
  }
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 0.75rem;
}

/* Back office shell */
.backoffice-body {
  background: #f4f6f9;
}

.backoffice-shell {
  display: flex;
  min-height: 100vh;
}

.backoffice-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #132238;
  color: #e8eef5;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar-version {
  color: #8fa3b8;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Mobile navigation drawer */
.backoffice-offcanvas {
  width: min(280px, 88vw);
  background: #132238;
  color: #e8eef5;
}

.backoffice-offcanvas .offcanvas-header {
  background: #0f1a2c;
}

.sidebar-brand a {
  color: #fff !important;
}

.btn-sidebar-nav-all.sidebar-nav-all-toggle {
  color: #c5d3e3;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  padding: 0.2rem 0.45rem;
  line-height: 1;
}

.btn-sidebar-nav-all.sidebar-nav-all-toggle:hover,
.btn-sidebar-nav-all.sidebar-nav-all-toggle:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.backoffice-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.backoffice-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.backoffice-content {
  flex: 1;
}

/* Layout flash alerts (_FlashMessages) — vertically center dismiss on multi-line copy */
.backoffice-content .alert.alert-dismissible.bo-flash-alert {
  padding-right: 2.75rem;
}

.backoffice-content .alert.alert-dismissible.bo-flash-alert .btn-close {
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  padding: 0.35rem;
  margin: 0;
}

/* Sidebar navigation */
.btn-toggle-sidebar {
  color: #c5d3e3;
  background: transparent;
  border: 0;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-toggle-sidebar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-sidebar {
  color: #b8c7d9;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.92rem;
}

.nav-link-sidebar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link-sidebar.active {
  color: #fff;
  background: #2563eb;
}

.nav-link-child {
  font-size: 0.88rem;
  padding-left: 0.5rem;
}

.nav-link-sidebar.disabled {
  cursor: default;
  opacity: 0.55;
}

/* Sidebar restore after navigation: no expand/collapse animation */
.bo-nav-restore .collapse,
.bo-nav-restore .collapse.collapsing,
.bo-nav-restore .collapsing {
  transition: none !important;
}

/* Dashboard */
.kpi-tile {
  background: #f8fafc;
  border: 1px solid #e5e9f0;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
}

.kpi-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.kpi-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

.kpi-delta {
  display: block;
  margin-top: 0.25rem;
}

.kpi-delta-positive {
  color: #15803d;
}

.kpi-delta-negative {
  color: #b91c1c;
}

.kpi-delta-muted {
  color: #64748b;
}

.dashboard-bulletin-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dashboard-bulletin-item {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e5e9f0;
}

.dashboard-bulletin-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.dashboard-bulletin-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
}

.dashboard-tender-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dashboard-tender-bar-track {
  height: 0.4rem;
  background: #e5e9f0;
  border-radius: 999px;
  overflow: hidden;
}

.dashboard-tender-bar-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  min-width: 2px;
}

.chart-placeholder {
  min-height: 220px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.page-title {
  font-weight: 600;
}

/* List page headers: keep actions top-aligned when descriptions wrap */
.bo-page-header {
  flex-wrap: nowrap !important;
  align-items: flex-start;
}

.bo-page-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.bo-page-header-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.store-selector-form .form-select,
.store-selector-form .store-select {
  border-color: #dee2e6;
  min-width: 0;
}

.store-selector-form .store-select {
  width: 100%;
}

@media (min-width: 576px) {
  .store-selector-form .store-select {
    width: auto;
    min-width: 12rem;
    max-width: 100%;
  }
}

/* Back office list grids — one typography + density for all data tables */
.backoffice-table,
.payroll-table {
  font-size: 0.875rem;
}

.backoffice-table > :not(caption) > * > *,
.payroll-table > :not(caption) > * > * {
  padding: 0.35rem 0.5rem;
  font-size: inherit;
  line-height: 1.4;
  vertical-align: middle;
}

.backoffice-table thead th,
.payroll-table thead th {
  font-size: 0.8rem;
  font-weight: 600;
}

.backoffice-table td.small,
.backoffice-table th.small,
.backoffice-table .small,
.payroll-table td.small,
.payroll-table th.small,
.payroll-table .small {
  font-size: inherit;
}

.backoffice-table .font-monospace,
.payroll-table .font-monospace {
  font-size: inherit;
}

.backoffice-table .form-select-sm,
.backoffice-table .form-control-sm {
  font-size: inherit;
  line-height: inherit;
}

.backoffice-table .backoffice-table-actions .btn-sm {
  font-size: inherit;
  line-height: inherit;
  --bs-btn-padding-y: 0.1rem;
  --bs-btn-padding-x: 0.4rem;
}

/* Form / modal action buttons — consistent width (Delete/Cancel size) */
.bo-form-actions .bo-action-btn,
.modal-footer .bo-action-btn {
  min-width: 5.5rem;
}

/* List row icon-only actions */
.backoffice-table-actions .bo-icon-btn {
  --bs-btn-padding-y: 0.1rem;
  --bs-btn-padding-x: 0.4rem;
  line-height: 1.2;
}

@media (max-width: 991.98px) {
  .backoffice-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .page-title {
    font-size: 1rem;
  }

  .kpi-value {
    font-size: 1.15rem;
  }

  .chart-placeholder {
    min-height: 160px;
  }
}

/* Customer Edit — balance label navigation (Reward / Store credit) */
.customer-balance-nav-btn {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.customer-balance-nav-btn .bi {
  font-size: 0.6rem;
}

/* Sortable table headers (_SortableTh server + _ReportSortableTh client) */
.sortable-th {
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.8rem;
  font-weight: 600;
}

.sortable-th .sortable-th__inner {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  justify-content: flex-start;
}

.sortable-th.text-end .sortable-th__inner {
  justify-content: flex-end;
}

.sortable-th.text-center .sortable-th__inner {
  justify-content: center;
}

.sortable-th__triangle,
.sortable-th button.sortable-th__triangle {
  color: #adb5bd;
  text-decoration: none;
  line-height: 1;
  padding: 0 0.1rem;
  font-size: 0.65rem;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sortable-th__triangle:hover,
.sortable-th button.sortable-th__triangle:hover {
  color: #2563eb;
}

.sortable-th a.sortable-th__label--mobile,
.sortable-th button.sortable-th__label--mobile {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
  padding: 0.15rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
  text-decoration: none;
}

.sortable-th a.sortable-th__label--desktop,
.sortable-th button.sortable-th__label--desktop {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
  padding: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.sortable-th a.sortable-th__triangle {
  text-decoration: none;
}

.sortable-th a.sortable-th__label--desktop:hover,
.sortable-th a.sortable-th__label--mobile:hover,
.sortable-th button.sortable-th__label--desktop:hover,
.sortable-th button.sortable-th__label--mobile:hover {
  color: #2563eb;
}

.sortable-th__triangle--on {
  color: #2563eb;
}

.sortable-th--active .sortable-th__label,
.sortable-th--active .sortable-th__label--desktop,
.sortable-th--active a.sortable-th__label--desktop,
.sortable-th--active button.sortable-th__label--desktop {
  color: #0f172a;
}

.sortable-th__dir-icon {
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
  color: #0f172a;
}

.sortable-th__dir-slot {
  align-items: center;
  line-height: 1;
}

@media (min-width: 992px) {
  .sortable-th__label--mobile .sortable-th__dir-icon {
    display: none !important;
  }
}

/* Item list column picker modal (drag reorder) */
.item-list-drag-handle {
  cursor: grab;
  line-height: 1;
  touch-action: none;
}

.item-list-drag-handle:active {
  cursor: grabbing;
}

.item-list-col-row--ghost {
  opacity: 0.55;
  background-color: var(--bs-light, #f8f9fa);
}

.item-list-col-row--chosen {
  background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
}

.phone-cell {
  width: 2.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .phone-cell {
    width: auto;
    text-align: left;
  }
}

.phone-cell__icon {
  line-height: 1;
}

/* POS-style numeric input (negative values in red, same as POS MyNumericTextField) */
.pos-decimal-input.pos-input-negative {
  color: var(--bs-danger);
}

/*
 * Status / role badges (Bootstrap 5.1 has no text-bg-* utilities).
 * Use bo-badge-* only — do not style .backoffice-topbar .badge globally (store row unchanged).
 */
.badge.bo-badge-secondary,
.badge.text-bg-secondary {
  color: #fff !important;
  background-color: var(--bs-secondary) !important;
}

.badge.bo-badge-success,
.badge.text-bg-success {
  color: #fff !important;
  background-color: var(--bs-success) !important;
}

.badge.bo-badge-primary,
.badge.text-bg-primary {
  color: #fff !important;
  background-color: var(--bs-primary) !important;
}

.badge.bo-badge-warning,
.badge.text-bg-warning {
  color: #212529 !important;
  background-color: var(--bs-warning) !important;
}

.badge.bo-badge-neutral,
.badge.text-bg-light {
  color: #212529 !important;
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
}

.item-thumbnail-frame {
  width: 100%;
  max-width: 160px;
  height: 160px;
  flex-shrink: 0;
  overflow: hidden;
}

.item-thumbnail-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.item-thumbnail-frame.bo-receipt-asset-frame {
  position: relative;
}

/* Store Settings receipt assets — thermal max box (576×220 logo, 576×260 banner) */
.item-thumbnail-frame.bo-receipt-logo-frame {
  max-width: min(100%, 288px);
  width: 100%;
  height: 110px;
  max-height: 110px;
}

.item-thumbnail-frame.bo-receipt-banner-frame {
  max-width: min(100%, 288px);
  width: 100%;
  height: 130px;
  max-height: 130px;
}

.bo-receipt-logo-img,
.bo-receipt-banner-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
}

.bo-receipt-asset-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  color: #6c757d;
}

.bo-receipt-preview-dimmed {
  opacity: 0.2;
}

.bo-receipt-asset-uploading .bo-receipt-upload-status {
  display: flex !important;
}

/* Local receipt pickers only — never block the whole page like bo-loading overlay */
.bo-receipt-asset-uploading {
  pointer-events: auto;
}

.bo-receipt-upload-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #0d6efd;
}

#item-thumbnail .card-body {
  flex: 1 1 auto;
}

.item-identity-card .card-body {
  min-height: 0;
}

.item-identity-extra {
  min-height: 0;
  margin-top: 1rem;
  padding-top: 0.25rem;
}

.item-description-input,
.item-subdescription-input {
  width: 100%;
  resize: none;
}

.item-description-input {
  min-height: 3.25rem;
}

.item-subdescription-input {
  min-height: 3.25rem;
}

.item-sale-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  max-width: 42rem;
}

.item-sale-info-row--off .item-sale-fields {
  visibility: hidden;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.item-sale-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.item-sale-field {
  flex: 0 0 auto;
}

.item-sale-field input[type="date"] {
  width: 9.5rem;
}

.item-sale-price-field input.form-control {
  width: 6.5rem;
}

.item-supplier-picker-list {
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.item-supplier-picker-row {
  color: #212529;
  border-left: 3px solid transparent;
}

.item-supplier-picker-row.is-selected {
  background-color: rgba(13, 110, 253, 0.1);
  color: #212529;
  border-left-color: #0d6efd;
}

.item-supplier-picker-row.is-selected .item-supplier-picker-label {
  color: #212529;
  font-weight: 500;
}

.item-supplier-picker-row.is-primary.is-selected {
  background-color: rgba(255, 193, 7, 0.12);
  border-left-color: #ffc107;
}

.item-supplier-picker-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.item-supplier-picker-star {
  line-height: 1;
}

.item-suppliers-primary {
  color: #212529;
}

.item-suppliers-primary-text {
  font-weight: 500;
}

.item-suppliers-additional {
  color: #495057;
}

.item-suppliers-additional-row {
  padding: 0.125rem 0;
  padding-left: 0.25rem;
  border-left: 2px solid #dee2e6;
  margin-bottom: 0.125rem;
}

.item-suppliers-additional-row:last-child {
  margin-bottom: 0;
}

.supplier-linked-items-table {
  max-height: min(50vh, 420px);
  overflow-y: auto;
}

/* Global loading overlay (bo-loading.js) — below Bootstrap modals so confirm dialogs stay clickable */
.bo-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 26, 44, 0.48);
  backdrop-filter: blur(1px);
}

.bo-loading-overlay.is-active {
  display: flex;
}

body.bo-loading-active {
  overflow: hidden;
}

.bo-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  background: rgba(19, 34, 56, 0.92);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

.bo-loading-spinner {
  width: 2.75rem;
  height: 2.75rem;
  border-width: 0.25rem;
  color: #fff;
}

.bo-loading-text {
  color: #e8eef5;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Master inventory copy progress — block all clicks until finished */
.bo-copy-page-blocker {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 26, 44, 0.48);
  backdrop-filter: blur(1px);
}

.bo-copy-page-blocker.is-active {
  display: flex;
}

body.bo-copy-page-active {
  overflow: hidden;
}

.pos-pin-input {
  text-align: left;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* CSV export progress (bo-csv-export.js) — above global loading */
.bo-csv-export-overlay {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 26, 44, 0.55);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.bo-csv-export-overlay.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body.bo-csv-export-active {
  overflow: hidden;
}

.bo-csv-export-panel {
  min-width: min(22rem, 90vw);
  max-width: 26rem;
}

/* Item edit — Non Discountable, promotion scheme, commission (stable layout) */
.item-discount-scheme-row {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) auto;
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
}

.item-discount-scheme-check {
  grid-column: 1;
  grid-row: 1;
}

.item-promotion-inline {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.item-promotion-inline--hidden {
  visibility: hidden;
  pointer-events: none;
}

.item-promotion-select {
  width: clamp(6.25rem, 30vw, 10.5rem);
  flex: 0 1 auto;
  max-width: 100%;
}

.item-promotion-summary {
  flex: 1 1 0;
  min-width: 0;
  line-height: 1.25;
}

.item-commission-inline {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem 0.5rem;
  flex: 0 0 auto;
  justify-self: end;
}

.item-commission-input {
  width: clamp(5rem, 12vw, 7rem);
}

@media (max-width: 767.98px) {
  .item-discount-scheme-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 0;
  }

  .item-discount-scheme-check {
    grid-column: 1;
    grid-row: 1;
  }

  .item-promotion-inline {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .item-promotion-inline--hidden {
    visibility: visible;
    pointer-events: none;
    display: none;
  }

  .item-commission-inline {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    flex-wrap: wrap;
  }

  .item-promotion-select {
    width: clamp(5.75rem, 38vw, 8.5rem);
  }
}

.promotion-linked-items-host .table {
  margin-bottom: 0;
}

.bo-report-metrics-guide .card-body ul li {
  margin-bottom: 0.35rem;
}

.bo-report-metrics-guide code {
  font-size: 0.85em;
  color: inherit;
}

.bo-report-metrics-guide .bo-metrics-guide-title-ko {
  display: none;
}

.bo-report-metrics-guide .bo-metrics-guide-lang-ko {
  display: none;
}

.bo-report-metrics-guide.bo-metrics-guide--ko .bo-metrics-guide-title-en {
  display: none;
}

.bo-report-metrics-guide.bo-metrics-guide--ko .bo-metrics-guide-title-ko {
  display: inline;
}

.bo-report-metrics-guide.bo-metrics-guide--ko .bo-metrics-guide-lang-en {
  display: none;
}

.bo-report-metrics-guide.bo-metrics-guide--ko .bo-metrics-guide-lang-ko {
  display: block;
}

.bo-metrics-guide-translate {
  color: var(--bs-secondary);
  line-height: 1.2;
}

.bo-metrics-guide-translate:hover,
.bo-metrics-guide-translate:focus {
  color: var(--bs-primary);
}

.kpi-tile-compact {
  padding: 0.55rem 0.75rem;
}

.kpi-tile-compact .kpi-value {
  font-size: 1.05rem;
}

.kpi-tile-compact .kpi-label {
  font-size: 0.6875rem;
}

.dashboard-trend-context-strip {
  margin-top: 0.75rem !important;
}

.dashboard-register-today .table {
  font-size: 0.8125rem;
}

.bo-sales-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 180px;
  overflow-x: auto;
  padding: 0 4px 4px;
}

.bo-sales-trend-bar-col {
  flex: 1 0 52px;
  min-width: 44px;
  max-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.bo-sales-trend-bar-track {
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px 4px 0 0;
}

.bo-sales-trend-bar-fill {
  width: 100%;
  background: #0d6efd;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  opacity: 0.88;
}

.bo-sales-trend-bar-label {
  font-size: 0.65rem;
  color: var(--bs-secondary);
  text-align: center;
  margin-top: 0.35rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Register shortcuts (POS-style ribbon) */
.bo-register-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.5rem;
  min-height: 4rem;
}

.bo-register-shortcut-tile {
  position: relative;
  background: var(--bs-light, #f8f9fa);
  border: 1px solid var(--bs-border-color, #ced4da);
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  min-height: 7rem;
  padding: 0.35rem 0.25rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#registerShortcutsCard[data-can-edit="1"] .bo-register-shortcut-tile:hover {
  border-color: var(--bs-primary-border-subtle, #9ec5fe);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bo-register-shortcut-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-bottom: 0.25rem;
}

.bo-register-shortcut-thumb {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.25rem;
}

.bo-register-shortcut-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--bs-secondary);
}

.bo-register-shortcut-title {
  font-size: 0.8rem;
  line-height: 1.2;
  max-height: 2.4rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.bo-register-shortcut-price {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
}

.bo-register-shortcut-sale {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bs-danger);
  color: #fff;
  border-radius: 0.35rem 0 0.35rem 0;
  padding: 0.15rem 0.35rem;
}

.bo-register-shortcut-delete {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  z-index: 2;
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.bo-register-shortcuts-ribbon {
  background: var(--bs-tertiary-bg);
}

.bo-register-shortcut-group-btn {
  min-width: 5rem;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--bs-border-color, #ced4da);
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bo-register-shortcut-group-btn.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

@media print {
  .backoffice-sidebar,
  .backoffice-topbar,
  .d-print-none {
    display: none !important;
  }

  .backoffice-main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* IRD Ads — customer display preview (5 wide : 5 tall) */
.ird-ad-preview-dialog {
  --ird-ad-preview-width: 320px;
  max-width: calc(var(--ird-ad-preview-width) + 2rem);
}

.ird-ad-preview-frame {
  width: var(--ird-ad-preview-width);
  max-width: 100%;
  aspect-ratio: 5 / 5;
  margin: 0 auto;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ird-ad-preview-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
