:root {
  --bs-primary: #2d6a4e;
  --bs-primary-rgb: 45, 106, 79;
  --bs-link-color: #2d6a4f;
  --bs-link-hover-color: #1b4332;
}

/* Single scroll: main content scrolls inside the grid, not the body */
html,
body.layout-fixed {
  height: 100%;
  overflow: hidden;
}

body.layout-fixed .app-wrapper {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

body.layout-fixed .app-main {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-content-header {
  padding-bottom: 0.75rem;
}

.app-breadcrumb {
  font-size: 0.875rem;
}

.page-actions {
  min-width: max-content;
}

@media (max-width: 575.98px) {
  .app-content-header .row {
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start !important;
  }
}

.sidebar-brand .brand-text {
  font-weight: 600 !important;
}

.sidebar-brand .brand-image {
  max-height: 2.1rem;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 0.35rem;
  padding: 0.15rem;
  opacity: 1;
  box-shadow: none;
}

.app-header-logo {
  height: 1.5rem;
  width: auto;
  object-fit: contain;
}

.login-brand-logo {
  display: block;
  width: 4.5rem;
  height: auto;
  margin: 0.5rem auto 0.75rem;
  object-fit: contain;
}

.app-content .card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table-actions .btn {
  padding: 0.15rem 0.4rem;
}

.datatable-hint {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.form-actions-sticky {
  position: sticky;
  bottom: 0;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  padding: 1rem;
  margin: 1.5rem -1rem 0;
  z-index: 10;
}

.upload-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.1s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.product-image-thumb {
  display: inline-block;
}

.product-image-thumb .img-thumbnail {
  display: block;
}

.product-image-delete {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  padding: 0.1rem 0.35rem;
  line-height: 1;
  opacity: 0.9;
}

.product-image-primary-badge {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  font-size: 0.65rem;
}

.upload-preview img {
  max-height: 120px;
  border-radius: 0.375rem;
}

.variant-row .remove-variant {
  margin-top: 0.25rem;
}

/* Avoid AdminLTE .timeline (different markup). Use app-timeline for simple lists. */
.app-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.app-timeline > li {
  position: relative;
  padding: 0 0 1rem 1.25rem;
  margin: 0 0 0 0.35rem;
  border-left: 2px solid #ced4da;
}

.app-timeline > li:last-child {
  padding-bottom: 0;
}

.app-timeline > li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #adb5bd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ced4da;
}

.app-timeline .timeline-date {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
}

.app-timeline .timeline-body {
  font-size: 0.925rem;
  line-height: 1.4;
  color: var(--bs-body-color);
}

.seo-serp-title {
  font-size: 1.125rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seo-serp-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seo-checklist li {
  margin-bottom: 0.25rem;
}

.login-page .login-box {
  width: 400px;
}

.login-page .brand-title {
  color: #2d6a4f;
}

.role-option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.role-option-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.5);
}

.role-option-card:has(.role-option-input:checked) {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.15);
}

.role-option-input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
}

.role-option-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-option-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--bs-body-color);
}

.role-option-hint {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--bs-secondary-color);
}

.role-guide-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.role-guide-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.role-guide-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--bs-secondary-color);
}

.order-queue-tabs .btn .badge {
  font-weight: 600;
}

#ordersTable tr.order-row-stale > * {
  --bs-table-bg: rgba(255, 193, 7, 0.14);
  --bs-table-striped-bg: rgba(255, 193, 7, 0.18);
  --bs-table-hover-bg: rgba(255, 193, 7, 0.24);
}

#ordersTable .table-actions .btn {
  white-space: nowrap;
}

#ordersTable .order-address,
#ordersTable .order-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 18rem;
  line-height: 1.35;
  white-space: normal;
}

#ordersTable .order-note {
  max-width: 12rem;
}

.order-payment-qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.leads-table .lead-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 16rem;
  line-height: 1.35;
  white-space: normal;
}
