/**
 * Lightspeed dashboard + content overlay
 * Aligns home / sales / ops dashboards and general pages with shell accent.
 */
:root {
  --ls-accent: #5844ed;
  --ls-accent-hover: #4634d6;
  --ls-accent-soft: rgba(88, 68, 237, 0.1);
  --ls-canvas: #f3f4f6;
  --ls-card: #ffffff;
  --ls-border: #e5e7eb;
  --ls-text: #1f2430;
  --ls-muted: #6b7280;
  --ls-radius: 8px;
}

/* Remap existing dashboard tokens → Lightspeed (all themed pages) */
body.zoho-theme {
  --dash-bg: var(--ls-canvas) !important;
  --dash-card: var(--ls-card) !important;
  --dash-border: var(--ls-border) !important;
  --dash-text: var(--ls-text) !important;
  --dash-muted: var(--ls-muted) !important;
  --dash-blue: var(--ls-accent) !important;
  --dash-blue-soft: var(--ls-accent-soft) !important;
  --prem-bg: var(--ls-canvas) !important;
  --prem-card: var(--ls-card) !important;
  --prem-border: var(--ls-border) !important;
  --prem-ink: var(--ls-text) !important;
  --prem-muted: var(--ls-muted) !important;
  --prem-blue: var(--ls-accent) !important;
  --prem-radius: var(--ls-radius) !important;
  --prem-shadow: none !important;
  --prem-shadow-hover: 0 4px 16px rgba(26, 29, 38, 0.06) !important;
  --ed-blue: var(--ls-accent) !important;
  --ed-ink: var(--ls-text) !important;
  --ed-muted: var(--ls-muted) !important;
  --ed-line: var(--ls-border) !important;
}

body.zoho-theme.japs-home-ops .content-wrapper,
body.zoho-theme.japs-home-ops .content,
body.zoho-theme.japs-home-ops .zoho-app-body,
body.zoho-theme.japs-home-ops #scrollable-container,
body.zoho-theme.japs-dashboard-home .content-wrapper,
body.zoho-theme.japs-dashboard-home .content,
body.zoho-theme.japs-dashboard-premium .content-wrapper,
body.zoho-theme.japs-dashboard-premium .content,
body.zoho-theme.japs-dashboard-premium .zoho-app-body,
body.zoho-theme.japs-dashboard-premium #scrollable-container {
  background: var(--ls-canvas) !important;
}

/* Gap under navbar — must win over japs-dashboard-home padding:0 !important */
body.zoho-theme:not(.pos-sale-theme) #scrollable-container,
body.zoho-theme.japs-dashboard-home #scrollable-container,
body.zoho-theme.japs-dashboard-home.japs-dashboard-premium #scrollable-container,
body.zoho-theme.japs-home-ops #scrollable-container,
body.zoho-theme.japs-dashboard-premium #scrollable-container {
  padding-top: 32px !important;
  padding-bottom: 44px !important;
  display: flex !important;
  flex-direction: column !important;
}

/* —— Retail home: ignore old ops chrome —— */
body.zoho-theme .japs-ops.ls-retail-home {
  padding: 12px 0 12px !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  width: 100% !important;
  flex: 0 0 auto !important;
}

body.zoho-theme .ls-retail-home .japs-ops__header,
body.zoho-theme .ls-retail-home .japs-ops__kpis,
body.zoho-theme .ls-retail-home .japs-ops__row {
  display: none !important;
}

/* —— Home ops header (legacy) —— */
body.zoho-theme .japs-ops:not(.ls-retail-home) {
  padding: 20px 4px 32px !important;
}

body.zoho-theme .japs-ops__title,
body.zoho-theme .japs-dashboard-welcome,
body.zoho-theme .zoho-dashboard__welcome {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--ls-text) !important;
  letter-spacing: -0.02em !important;
}

body.zoho-theme .japs-ops__greeting {
  color: var(--ls-muted) !important;
  font-size: 13px !important;
}

body.zoho-theme .japs-ops__date,
body.zoho-theme .japs-ops__search,
body.zoho-theme .japs-dashboard-filter-btn,
body.zoho-theme .zoho-dashboard__filter-btn {
  background: #fff !important;
  border: 1px solid var(--ls-border) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: var(--ls-text) !important;
  font-weight: 500 !important;
  height: 36px !important;
}

body.zoho-theme .japs-ops__date:hover,
body.zoho-theme .japs-dashboard-filter-btn:hover {
  border-color: #c9ced8 !important;
}

/* —— KPI row: always full content width —— */
body.zoho-theme.japs-dashboard-home .japs-dash-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  body.zoho-theme.japs-dashboard-home .japs-dash-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  body.zoho-theme.japs-dashboard-home .japs-dash-kpi-row {
    grid-template-columns: 1fr !important;
  }
}

body.zoho-theme.japs-dashboard-home .japs-dash-kpi-card {
  min-width: 0 !important;
  width: 100% !important;
}

/* —— KPI cards —— */
body.zoho-theme .japs-ops-kpi,
body.zoho-theme .japs-dash-kpi-card {
  background: #fff !important;
  border: 1px solid var(--ls-border) !important;
  border-radius: var(--ls-radius) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body.zoho-theme .japs-ops-kpi:hover,
body.zoho-theme .japs-dash-kpi-card:hover {
  border-color: #d0d4dc !important;
  box-shadow: 0 4px 14px rgba(26, 29, 38, 0.06) !important;
}

body.zoho-theme .japs-ops-kpi__icon--blue,
body.zoho-theme .japs-ops-action__ico--blue {
  background: var(--ls-accent) !important;
}

body.zoho-theme .japs-ops-kpi__icon--navy {
  background: #3d348b !important;
}

body.zoho-theme .japs-ops-kpi__label,
body.zoho-theme .japs-dash-kpi-card__label {
  color: var(--ls-muted) !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  text-transform: none !important;
}

body.zoho-theme .japs-ops-kpi__value,
body.zoho-theme .japs-dash-kpi-card__value {
  color: var(--ls-text) !important;
  font-weight: 700 !important;
}

body.zoho-theme .japs-dash-kpi-card--blue .japs-dash-kpi-card__icon,
body.zoho-theme .japs-dash-kpi-card--violet .japs-dash-kpi-card__icon,
body.zoho-theme .japs-dash-kpi-card--teal .japs-dash-kpi-card__icon {
  background: var(--ls-accent-soft) !important;
  color: var(--ls-accent) !important;
}

/* —— Content cards —— */
body.zoho-theme .japs-ops-card,
body.zoho-theme .zoho-dashboard__card,
body.zoho-theme .japs-dash-card,
body.zoho-theme .att-clock-card {
  background: #fff !important;
  border: 1px solid var(--ls-border) !important;
  border-radius: var(--ls-radius) !important;
  box-shadow: none !important;
}

body.zoho-theme .japs-ops-card__title,
body.zoho-theme .zoho-dashboard__card-title {
  font-size: 15px !important;
  font-weight: 650 !important;
  color: var(--ls-text) !important;
}

body.zoho-theme .japs-ops-link,
body.zoho-theme a.japs-ops-link,
body.zoho-theme .zoho-dashboard a:not(.btn):not(.ls-panel-link):not(.ls-rail-btn) {
  color: var(--ls-accent) !important;
}

body.zoho-theme .japs-ops-link:hover {
  color: var(--ls-accent-hover) !important;
}

body.zoho-theme .japs-ops-dot--online,
body.zoho-theme .japs-ops-stage--picking {
  color: var(--ls-accent) !important;
}

body.zoho-theme .japs-ops-dot--online {
  background: var(--ls-accent) !important;
  color: transparent !important;
}

/* Mini tables on dashboard */
body.zoho-theme .japs-ops-mini-table thead th {
  background: #f7f8fa !important;
  border-bottom: 1px solid var(--ls-border) !important;
  color: var(--ls-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.zoho-theme .japs-ops-mini-table tbody td {
  border-top: 1px solid #eef0f3 !important;
  font-size: 13px !important;
}

/* Stepper / source row */
body.zoho-theme .japs-ops-stepper__icon {
  background: var(--ls-accent-soft) !important;
  color: var(--ls-accent) !important;
}

body.zoho-theme .japs-ops-stepper__line {
  background: var(--ls-border) !important;
}

/* Sales analytics hero */
body.zoho-theme .japs-dashboard-hero,
body.zoho-theme .zoho-dashboard__header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 8px 0 16px !important;
}

body.zoho-theme .japs-dashboard-page {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Select2 / filters on dashboard */
body.zoho-theme .japs-ops .select2-container--default .select2-selection--single,
body.zoho-theme .zoho-dashboard .select2-container--default .select2-selection--single {
  border-radius: 6px !important;
  border-color: var(--ls-border) !important;
  height: 36px !important;
}

body.zoho-theme .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--ls-accent) !important;
}

/* Charts container cards */
body.zoho-theme .zoho-dashboard__chart-card,
body.zoho-theme .japs-dash-chart,
body.zoho-theme .box.box-solid.box-primary {
  border: 1px solid var(--ls-border) !important;
  border-radius: var(--ls-radius) !important;
  box-shadow: none !important;
  background: #fff !important;
}

body.zoho-theme .box.box-primary > .box-header,
body.zoho-theme .box-solid.box-primary > .box-header {
  background: #fff !important;
  color: var(--ls-text) !important;
  border-bottom: 1px solid #eef0f3 !important;
}

/* Pagination active */
body.zoho-theme .pagination > .active > a,
body.zoho-theme .pagination > .active > span,
body.zoho-theme .paginate_button.current {
  background: var(--ls-accent) !important;
  border-color: var(--ls-accent) !important;
}

/* Tabs */
body.zoho-theme .nav-tabs > li.active > a,
body.zoho-theme .nav-tabs > li.active > a:hover,
body.zoho-theme .nav-tabs > li.active > a:focus {
  border-bottom-color: var(--ls-accent) !important;
  color: var(--ls-accent) !important;
}

/* Modal primary actions */
body.zoho-theme .modal-footer .btn-primary,
body.zoho-theme .swal2-confirm {
  background: var(--ls-accent) !important;
  border-color: var(--ls-accent) !important;
}

/* Report page: Lightspeed-like centered title block */
body.zoho-theme .content-header {
  text-align: left;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 24px 8px !important;
}

body.zoho-theme .content-header h1 small,
body.zoho-theme .content-header .text-muted {
  color: var(--ls-muted) !important;
  font-weight: 400 !important;
}

/* Info / callout links */
body.zoho-theme .text-primary,
body.zoho-theme a.text-primary {
  color: var(--ls-accent) !important;
}

body.zoho-theme .bg-primary,
body.zoho-theme .label-primary,
body.zoho-theme .badge-primary {
  background-color: var(--ls-accent) !important;
}

/* Checkbox accent where supported */
body.zoho-theme input[type='checkbox']:checked,
body.zoho-theme input[type='radio']:checked {
  accent-color: var(--ls-accent);
}

/* Ecommerce dash accents */
body.zoho-theme .ecom-dash .ed-title {
  color: var(--ls-text) !important;
}

body.zoho-theme .ecom-dash a,
body.zoho-theme .ecom-dash .ed-link {
  color: var(--ls-accent) !important;
}

/* Soften heavy card radii app-wide on premium */
body.zoho-theme.japs-dashboard-premium .box,
body.zoho-theme.japs-dashboard-premium .panel,
body.zoho-theme.japs-dashboard-premium .card,
body.zoho-theme.japs-dashboard-premium .japs-ops-card,
body.zoho-theme.japs-dashboard-premium .japs-dash-kpi-card {
  border-radius: var(--ls-radius) !important;
}
