/*
 * ENTEGRA brand layer on top of official Tabler (Phase 6).
 * Tabler components/utilities first; this file only adds brand tokens and the
 * handful of ENTEGRA-specific pieces Tabler has no ready-made class for
 * (brand mark, disabled nav placeholder, initials avatar, mobile nav chevron).
 */

/*
 * The legacy calculator widget (public/js/functions.js's calculator.js,
 * pulled in via vendor.js) auto-builds a "recent calculations" history
 * popup (#calc-hist-popup) and toggles it with inline display styles.
 * This V3 shell has no calculator trigger button - it's orphaned dead UI
 * with no owner to click it - so force it hidden regardless of what
 * inline style the plugin sets.
 */
#calc-hist-popup {
  display: none !important;
}

/*
 * Fix for a packaging mismatch in the vendored Tabler Icons distribution:
 * vendor/tabler/dist/icons/css/tabler-icons.min.css declares its @font-face
 * src as "./fonts/tabler-icons.woff2" (relative to the css/ folder), but the
 * actual font files were vendored one level up, at
 * vendor/tabler/dist/icons/fonts/ - so every ti-* icon renders as a missing
 * glyph. Not editable directly (public/vendor/** is outside this tool's
 * write permissions); this @font-face re-declaration with the correct path
 * loads after the broken one and wins on font-family/weight/style match.
 */
@font-face {
  font-family: "tabler-icons";
  font-style: normal;
  font-weight: 400;
  src:
    url("/vendor/tabler/dist/icons/fonts/tabler-icons.woff2") format("woff2"),
    url("/vendor/tabler/dist/icons/fonts/tabler-icons.woff") format("woff"),
    url("/vendor/tabler/dist/icons/fonts/tabler-icons.ttf") format("truetype");
}

:root {
  --entegra-primary: #066fd1;
  --entegra-dashboard-band: #0040C1;
  --entegra-background: #f9fafb;
  --entegra-surface: #ffffff;
  --entegra-text: #1f2937;
  --entegra-muted: #6b7280;
  --entegra-border: #e5e7eb;
  --entegra-positive: #2fb344;
  --entegra-warning: #f59f00;
  --entegra-danger: #d63939;
  --entegra-shadow-dropdown: 0 16px 24px 2px rgba(0, 0, 0, 0.07), 0 6px 30px 5px rgba(0, 0, 0, 0.06), 0 8px 10px -5px rgba(0, 0, 0, 0.1);
}

/*
 * Tabler v3 adds scrollbar compensation to :root on desktop:
 * margin-left: calc(100vw - 100%);
 * In the ENTEGRA shell this causes an unwanted left offset.
 */
@media (min-width: 992px) {
  :root {
    margin-left: 0;
  }
}

/*
 * Pages whose total height crosses the "needs a vertical scrollbar"
 * threshold when their content changes (e.g. a DataTables reload that
 * changes row count) otherwise cause the whole page to shift sideways and
 * back: without
 * a permanently-reserved scrollbar gutter, 100vw briefly widens/narrows by
 * the scrollbar's own width the instant it appears/disappears. Tabler v3's
 * own :root { margin-left: calc(100vw - 100%); } is designed to compensate
 * for exactly this, but it's disabled at >=992px right above ("caused an
 * unwanted left offset") - rather than touch that existing, shell-wide
 * decision, this reserves the scrollbar's space permanently instead, which
 * removes the appear/disappear event itself.
 */
html {
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body.entegra-shell {
  background: var(--entegra-background);
  color: var(--entegra-text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Brand mark (shared by login and app shell) */
.entegra-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--entegra-text);
}

.entegra-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 2rem;
  background: var(--entegra-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.entegra-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.entegra-brand-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--entegra-muted);
}

.entegra-auth-footer {
  font-size: 0.8125rem;
}

/* App shell header rows */
.entegra-header {
  background: var(--entegra-surface);
  border-bottom: 1px solid var(--entegra-border);
}

.entegra-subheader {
  background: var(--entegra-surface);
  border-bottom: 1px solid var(--entegra-border);
}

/*
 * NOTE: an overflow-x:auto strip was tried here to contain the desktop nav
 * row's width instead - reverted. Per the CSS Overflow spec, setting
 * overflow-x to anything but visible forces overflow-y's used value to
 * 'auto' too, which clipped every dropdown submenu (Satışlar/Ürünler/...)
 * hanging below the row - none of them could open. The actual fix is the
 * navbar-expand-md -> navbar-expand-xl breakpoint change in
 * layouts/entegra/app.blade.php (see the comment there): below 1200px the
 * existing hamburger/accordion nav is used instead, so the row is only ever
 * shown where its 10 items already fit and no clipping container is needed.
 */

.entegra-page-wrapper {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

body.entegra-tabler .entegra-page-wrapper {
  background: linear-gradient(var(--entegra-dashboard-band) 0 13rem, transparent 13rem);
}

body.entegra-tabler .entegra-dashboard-heading {
  color: #ffffff;
}

body.entegra-tabler .entegra-dashboard-heading .text-secondary,
body.entegra-tabler .entegra-dashboard-heading .page-pretitle {
  color: rgba(255, 255, 255, 0.72) !important;
}

body.entegra-tabler .entegra-dashboard-heading .page-title {
  color: #ffffff;
}

body.entegra-tabler .entegra-dashboard-heading .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #ffffff;
}

body.entegra-tabler .entegra-dashboard-heading .btn-outline-secondary:hover,
body.entegra-tabler .entegra-dashboard-heading .btn-outline-secondary:focus {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.entegra-header-actions {
  gap: 0.25rem;
  align-items: center;
}

.entegra-quick-sale {
  align-self: center;
}

/* Disabled / "coming soon" nav entry (e.g. Pazaryerleri) */
.entegra-nav-disabled {
  cursor: default;
  opacity: 0.65;
}

.entegra-nav-disabled:hover {
  color: inherit;
}

.entegra-nav-hint {
  max-width: 20rem;
}

/* Mobile nav accordion */
.entegra-mobile-nav-collapse {
  background: var(--entegra-surface);
  border-bottom: 1px solid var(--entegra-border);
}

.entegra-mobile-nav .nav-link {
  color: var(--entegra-text);
}

.entegra-nav-chevron {
  transition: transform 0.15s ease;
}

.entegra-mobile-nav-collapse a[aria-expanded="true"] .entegra-nav-chevron {
  transform: rotate(180deg);
}

/* Notifications */
.entegra-notif-badge {
  position: relative;
  top: -0.65rem;
  left: -0.4rem;
  font-size: 0.625rem;
  padding: 0.15rem 0.35rem;
}

.entegra-notif-menu {
  width: 22rem;
  max-width: 90vw;
  max-height: 70vh;
  overflow-y: auto;
}

/* Initials avatar (no photo uploaded yet) */
.entegra-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--entegra-primary);
  color: #fff;
  font-weight: 600;
}

/*
 * Minimal styling for daterangepicker.js (Dan Grossman's widely-used plugin,
 * used by the dashboard's date filter via public/js/home.js - real, existing
 * behavior, not something this UI phase invented). Its own CSS normally ships
 * inside the legacy public/css/vendor.css bundle, but that entire bundle is
 * 404 on this preview server (a pre-existing build/deploy gap unrelated to
 * this UI work - public/css/vendor.css, app.css, tailwind/app.css all 404).
 * Without ANY positioning CSS the plugin's DOM renders inline in the page
 * flow instead of as a floating popup. This reproduces just enough of the
 * library's well-documented, stable class structure to make it usable and
 * Tabler-consistent, not a guess at unknown behavior.
 */
.daterangepicker {
  position: absolute;
  z-index: 1055;
  display: none;
  background: var(--entegra-surface);
  border: 1px solid var(--entegra-border);
  border-radius: 6px;
  box-shadow: var(--tblr-shadow-dropdown, var(--entegra-shadow-dropdown));
  margin-top: 0.5rem;
  font-size: 0.875rem;
  max-width: none;
}

.daterangepicker.show-calendar .calendar {
  display: block;
}

.daterangepicker .calendar {
  display: none;
  max-width: 270px;
  margin: 0.25rem;
}

.daterangepicker .drp-calendar {
  display: none;
  max-width: 270px;
  padding: 0.5rem;
}

.daterangepicker.show-calendar .drp-calendar {
  display: block;
}

.daterangepicker .calendar-table {
  border-radius: 6px;
  background: var(--entegra-surface);
}

.daterangepicker .calendar-table table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.daterangepicker td,
.daterangepicker th {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  min-width: 2rem;
  width: 2rem;
  height: 1.75rem;
  line-height: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
  background: var(--entegra-surface);
  color: var(--entegra-muted);
  opacity: 0.5;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
  background: var(--entegra-background);
}

.daterangepicker td.in-range {
  background: rgba(6, 111, 209, 0.08);
  border-radius: 0;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background: var(--entegra-primary);
  color: #fff;
}

.daterangepicker td.disabled,
.daterangepicker option.disabled {
  color: var(--entegra-muted);
  cursor: not-allowed;
  text-decoration: line-through;
}

.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
  border: solid var(--entegra-text);
  border-width: 0 2px 2px 0;
  border-radius: 0;
  display: inline-block;
  padding: 3px;
}

.daterangepicker .calendar-table .next span {
  transform: rotate(-45deg);
}

.daterangepicker .calendar-table .prev span {
  transform: rotate(135deg);
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect,
.daterangepicker select.hourselect,
.daterangepicker select.minuteselect,
.daterangepicker select.ampmselect {
  font-size: 0.75rem;
  padding: 1px;
  height: auto;
  margin: 0 2px;
  border: 1px solid var(--entegra-border);
  border-radius: 0.25rem;
  background: var(--entegra-surface);
}

.daterangepicker .ranges {
  float: none;
  text-align: left;
  margin: 0;
  order: -1;
}

.daterangepicker .ranges ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  width: 100%;
}

.daterangepicker .ranges li {
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.daterangepicker .ranges li:hover {
  background: rgba(6, 111, 209, 0.08);
  color: var(--entegra-primary);
}

.daterangepicker .ranges li.active {
  background: var(--entegra-primary);
  color: #fff;
}

.daterangepicker.show-ranges .drp-calendar,
.daterangepicker.show-ranges .ranges {
  display: block;
}

.daterangepicker .drp-buttons {
  clear: both;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--entegra-border);
}

.daterangepicker .drp-selected {
  display: none;
}

.daterangepicker .drp-buttons .btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

@media (max-width: 575.98px) {
  .entegra-notif-menu {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ==========================================================================
   ENTEGRA dashboard — Tabler-style composition
   Based on Tabler's card/subheader/h1/card-sm visual hierarchy.
   ========================================================================== */

.entegra-dashboard-heading {
  min-width: 0;
}

.entegra-dashboard-filters {
  align-items: center;
}

.entegra-dashboard-filters .select2-container {
  width: 12rem !important;
  max-width: 100%;
}

/* Welcome card ----------------------------------------------------------- */
.entegra-welcome-card {
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--entegra-primary) 9%, transparent), transparent 34%),
    var(--entegra-surface);
}

.entegra-welcome-card .card-body {
  min-height: 12.75rem;
}

.entegra-welcome-metrics {
  --tblr-gutter-x: 1.75rem;
}

.entegra-welcome-progress {
  width: 8rem;
  max-width: 100%;
}

.entegra-welcome-art {
  position: relative;
  width: 12.5rem;
  height: 9.5rem;
}

.entegra-art-glow {
  position: absolute;
  inset: 1.25rem 1.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--entegra-primary) 7%, transparent);
}

.entegra-art-card {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid color-mix(in srgb, var(--entegra-primary) 18%, var(--entegra-border));
  border-radius: 1rem;
  background: var(--entegra-surface);
  box-shadow: 0 0.65rem 1.4rem rgba(24, 36, 51, 0.09);
  color: var(--entegra-primary);
  font-size: 1.65rem;
}

.entegra-art-card--check {
  top: 2.75rem;
  left: 4.4rem;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--entegra-primary);
  color: #fff;
  font-size: 2rem;
}

.entegra-art-card--sales {
  top: 0.25rem;
  left: 0.5rem;
  transform: rotate(-7deg);
}

.entegra-art-card--money {
  right: 0.15rem;
  bottom: 0.35rem;
  transform: rotate(8deg);
}

.entegra-art-dot {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--entegra-primary);
}

.entegra-art-dot--one {
  top: 0.65rem;
  right: 3.25rem;
}

.entegra-art-dot--two {
  bottom: 1rem;
  left: 2.4rem;
  opacity: 0.55;
}

.entegra-art-dot--three {
  top: 3.7rem;
  right: 0.4rem;
  width: 0.35rem;
  height: 0.35rem;
  opacity: 0.35;
}

/* Featured metric cards ------------------------------------------------- */
.entegra-feature-card,
.entegra-ratio-card,
.entegra-analysis-card,
.entegra-dashboard-table-card {
  min-width: 0;
  overflow: hidden;
}

.entegra-feature-card .card-body,
.entegra-ratio-card .card-body {
  padding: 1rem;
}

.entegra-feature-card .h1,
.entegra-ratio-card .h1 {
  font-size: 1.55rem;
  line-height: 1.15;
  white-space: nowrap;
}

.entegra-feature-card .subheader,
.entegra-ratio-card .subheader {
  min-width: 0;
}

/* Total-sales sparkline: behaves like Tabler's bottom chart strip. */
.entegra-sparkline {
  position: relative;
  width: 100%;
  min-height: 3.6rem;
  overflow: hidden;
}

.entegra-sparkline--card {
  margin-top: auto;
  border-radius: 0 0 var(--tblr-border-radius-card, 0.375rem) var(--tblr-border-radius-card, 0.375rem);
}

.entegra-sparkline svg {
  display: block;
  width: 100%;
  height: 3.6rem;
}

.entegra-sparkline-area {
  fill: color-mix(in srgb, var(--entegra-primary) 12%, transparent);
}

.entegra-sparkline-line {
  fill: none;
  stroke: var(--entegra-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Net radial indicator -------------------------------------------------- */
.entegra-ring-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 6.6rem;
}

.entegra-net-ring {
  --entegra-ring-value: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 7.2rem;
  height: 7.2rem;
  border-radius: 50%;
  background: conic-gradient(from 225deg,
      var(--entegra-primary) 0deg,
      var(--entegra-primary) var(--entegra-ring-value),
      color-mix(in srgb, var(--entegra-border) 70%, white) var(--entegra-ring-value),
      color-mix(in srgb, var(--entegra-border) 70%, white) 270deg,
      transparent 270deg 360deg);
  transform: rotate(45deg);
}

.entegra-net-ring::after {
  content: "";
  position: absolute;
  width: 5.15rem;
  height: 5.15rem;
  border-radius: 50%;
  background: var(--entegra-surface);
}

.entegra-net-ring-inner {
  position: relative;
  z-index: 1;
  transform: rotate(-45deg);
  color: var(--entegra-text);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Compact ratio cards --------------------------------------------------- */
.entegra-ratio-card .progress {
  background: color-mix(in srgb, var(--entegra-border) 78%, white);
}

.entegra-ratio-card .progress-bar,
.entegra-welcome-card .progress-bar {
  transition: width 0.25s ease;
}

/* Analysis charts ------------------------------------------------------- */
.entegra-analysis-card .card-body {
  padding: 1rem 1rem 0.35rem;
}

.entegra-chart-widget {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 210px;
  height: 210px;
  overflow: hidden;
}

.entegra-chart-widget>div:not(.entegra-chart-empty) {
  width: 100% !important;
  min-width: 0 !important;
}

.entegra-chart-widget .highcharts-container,
.entegra-chart-widget .highcharts-root {
  max-width: 100%;
  font-family: inherit !important;
}

.entegra-chart-widget .highcharts-background {
  fill: transparent !important;
}

.entegra-chart-widget .highcharts-axis-labels text,
.entegra-chart-widget .highcharts-legend-item text,
.entegra-chart-widget .highcharts-tooltip text {
  font-family: inherit !important;
}

.entegra-chart-widget .highcharts-graph {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entegra-chart-widget .highcharts-area {
  opacity: 0.12;
}

.entegra-chart-widget .highcharts-tooltip-box {
  fill: var(--entegra-surface) !important;
  stroke: var(--entegra-border) !important;
  stroke-width: 1;
  rx: 8;
  ry: 8;
}

.entegra-chart-widget .highcharts-contextbutton {
  display: none !important;
}

.entegra-chart-widget.is-empty>div:not(.entegra-chart-empty) {
  opacity: 0.16;
}

.entegra-chart-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
  color: var(--entegra-muted);
  font-size: 0.8125rem;
  text-align: center;
}

.entegra-chart-empty i {
  color: color-mix(in srgb, var(--entegra-primary) 65%, var(--entegra-muted));
  font-size: 1.8rem;
}

/* Dashboard tables ------------------------------------------------------ */
.entegra-dashboard-table-card .card-header {
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
}

.entegra-dashboard-table-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.entegra-dashboard-card-actions .select2-container {
  width: 100% !important;
}

.entegra-dashboard-table-card .table-responsive {
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.entegra-dashboard-table-card table {
  margin-bottom: 0;
}

.entegra-dashboard-table-card th,
.entegra-dashboard-table-card td {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

.entegra-dashboard-table-card thead th {
  white-space: nowrap;
  color: var(--entegra-muted);
  background: color-mix(in srgb, var(--entegra-background) 58%, white);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.entegra-dashboard-table-card th.not-export {
  width: 1%;
  white-space: nowrap;
}

/* ==========================================================================
   DataTables compatibility / Tabler V3
   ========================================================================== */
.dataTables_wrapper {
  position: relative;
  width: 100%;
  color: var(--entegra-text);
}

.dataTables_wrapper .dt-buttons:empty {
  display: none !important;
}

.dataTables_wrapper td.dataTables_empty {
  padding: 1.55rem 1rem !important;
  text-align: center !important;
  color: var(--entegra-muted);
  font-size: 0.8125rem;
  background: var(--entegra-surface);
}

.dataTables_wrapper .dataTables_info {
  float: left !important;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem 0.625rem;
  color: var(--entegra-muted);
  font-size: 0.72rem;
  line-height: 1.25rem;
}

.dataTables_wrapper .dataTables_paginate {
  float: right !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 2.75rem;
  padding: 0.375rem 1rem 0.625rem;
}

.dataTables_wrapper::after {
  display: block;
  clear: both;
  content: "";
}

.dataTables_wrapper .dataTables_paginate .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button>a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--entegra-border);
  border-radius: 0.375rem;
  background: var(--entegra-surface);
  color: var(--entegra-text);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button>a:hover {
  border-color: color-mix(in srgb, var(--entegra-primary) 35%, var(--entegra-border));
  background: color-mix(in srgb, var(--entegra-primary) 7%, var(--entegra-surface));
  color: var(--entegra-primary);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active>a {
  border-color: var(--entegra-primary);
  background: var(--entegra-primary);
  color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled>a {
  border-color: var(--entegra-border);
  background: var(--entegra-surface);
  color: var(--entegra-muted);
  opacity: 0.48;
  pointer-events: none;
}

.dataTables_wrapper .dataTables_processing {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: auto;
  min-width: 8rem;
  margin: 0;
  padding: 0.75rem 1rem;
  transform: translate(-50%, -50%);
  border: 1px solid var(--entegra-border);
  border-radius: 0.5rem;
  background: var(--entegra-surface);
  box-shadow: 0 0.5rem 1.5rem rgba(24, 36, 51, 0.12);
  color: var(--entegra-muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .entegra-welcome-card .card-body {
    min-height: 11.5rem;
  }

  .entegra-analysis-card .h3 {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .entegra-dashboard-filters {
    width: 100%;
  }

  .entegra-dashboard-filters .select2-container,
  .entegra-dashboard-filters .btn {
    width: 100% !important;
  }

  .entegra-welcome-card .card-body {
    min-height: auto;
  }

  .entegra-feature-card .h1,
  .entegra-ratio-card .h1 {
    font-size: 1.4rem;
  }

  .entegra-ring-wrap {
    min-height: 5.75rem;
  }

  .entegra-net-ring {
    width: 6.3rem;
    height: 6.3rem;
  }

  .entegra-net-ring::after {
    width: 4.55rem;
    height: 4.55rem;
  }

  .entegra-dashboard-table-card .card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .entegra-dashboard-card-actions {
    width: 100%;
    min-width: 0 !important;
    margin-left: 0 !important;
  }

  .dataTables_wrapper .dataTables_info {
    float: none !important;
    width: 100%;
    min-height: auto;
    padding: 0.625rem 0.75rem 0.25rem;
  }

  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: 100%;
    min-height: auto;
    justify-content: flex-start;
    padding: 0.375rem 0.75rem 0.75rem;
  }

  .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: flex-start;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button>a {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  #sales_payment_dues_table,
  #purchase_payment_dues_table {
    min-width: 40rem;
  }

  #stock_alert_table {
    min-width: 32rem;
  }
}

@media (max-width: 575.98px) {
  .entegra-dashboard-heading {
    margin-bottom: 0.875rem !important;
  }

  .entegra-feature-card .card-body,
  .entegra-ratio-card .card-body {
    padding: 0.875rem;
  }

  .entegra-sparkline,
  .entegra-sparkline svg {
    min-height: 3.15rem;
    height: 3.15rem;
  }

  .entegra-chart-widget {
    min-height: 180px;
    height: 180px;
  }

  .entegra-analysis-card .card-body {
    padding: 0.875rem 0.75rem 0.2rem;
  }

  .entegra-analysis-card .card-title {
    font-size: 0.9rem;
  }

  .entegra-analysis-card .h3 {
    font-size: 0.9rem;
  }

  .entegra-dashboard-table-card .card-header {
    min-height: auto;
    padding: 0.75rem;
  }

  .entegra-dashboard-table-card th,
  .entegra-dashboard-table-card td {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.8125rem;
  }
}

/* "Tüm Satışlar" (Sell) DataTable — legacy-compat shim, scoped to
   #sell_table_wrapper so it can never leak onto other pages.
   The action-column dropdown is server-rendered Bootstrap-3-era markup
   (SellController@index, shared with still non-Tabler pages) and is left
   as-is here; it is no longer rewritten to Tabler dropdown markup
   client-side, so no per-action CSS shim is provided on this page.
   What remains un-styleable from Blade is DataTables' own scrollX/scrollY
   wrapper (#sell_table_wrapper, generated at runtime), which has no Tabler
   equivalent - only a plain border to match card-table's row dividers. */

#sell_table_wrapper .dataTables_scrollHead,
#sell_table_wrapper .dataTables_scrollBody {
  border-bottom: 1px solid var(--tblr-border-color, #dce1e7);
}

/* select2 -> Tabler v3 .form-select visual adapter, scoped to the Tabler app
   shell (body.entegra-tabler, added in layouts/entegra/app.blade.php) so it
   can never affect the legacy non-Tabler pages that still load select2's
   stock skin. select2 is used by every layouts.entegra.app page with a
   searchable dropdown (e.g. the dashboard's location filter too), not just
   Sell. entegra/css/select2.min.css (linked in layouts/entegra/app.blade.php)
   only supplies select2's own default 2016-era skin and, critically, the
   `.select2-hidden-accessible` rule select2's JS relies on to hide the native
   <select> it replaces - without it the native select and the select2 widget
   were both visible at once ("duplicated value" bug). These overrides make the
   widget itself read as a native Tabler form-select instead of select2's skin. */
body.entegra-tabler .select2-container--default .select2-selection--single {
  height: calc(1.4285714286em + 0.5rem + 2px);
  display: flex;
  align-items: center;
  padding: 0 2.25rem 0 0.75rem;
  border: 1px solid var(--tblr-border-color, #e5e7eb);
  border-radius: var(--tblr-border-radius, 6px);
  background-color: var(--tblr-bg-surface, #fff);
}

body.entegra-tabler .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.4285714286;
  color: var(--tblr-body-color, inherit);
}

body.entegra-tabler .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--tblr-secondary, #6b7280);
}

body.entegra-tabler .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 0.5rem;
}

body.entegra-tabler .select2-container--default.select2-container--focus .select2-selection--single,
body.entegra-tabler .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--tblr-primary, #066fd1);
  box-shadow: 0 0 0 0.25rem rgba(6, 111, 209, 0.25);
}

body.entegra-tabler .select2-container--default .select2-dropdown {
  border-color: var(--tblr-border-color, #e5e7eb);
  border-radius: var(--tblr-border-radius, 6px);
  box-shadow: var(--tblr-shadow-dropdown, var(--entegra-shadow-dropdown));
  overflow: hidden;
}

body.entegra-tabler .select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: var(--tblr-border-color, #e5e7eb);
  border-radius: var(--tblr-border-radius, 6px);
}

body.entegra-tabler .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--tblr-primary, #066fd1);
  color: #ffffff;
}

body.entegra-tabler .select2-container--default .select2-selection--multiple {
  min-height: calc(1.4285714286em + 0.5rem + 2px);
  padding: 0.1875rem 0.375rem;
  border: 1px solid var(--tblr-border-color, #e5e7eb);
  border-radius: var(--tblr-border-radius, 6px);
  background-color: var(--tblr-bg-surface, #fff);
}

body.entegra-tabler .select2-container--default.select2-container--focus .select2-selection--multiple,
body.entegra-tabler .select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--tblr-primary, #066fd1);
  box-shadow: 0 0 0 0.25rem rgba(6, 111, 209, 0.25);
}

body.entegra-tabler .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--tblr-body-bg, #f9fafb);
  border: 1px solid var(--tblr-border-color, #e5e7eb);
  border-radius: var(--tblr-border-radius-sm, 4px);
  color: var(--tblr-body-color, #1f2937);
  padding: 0.125rem 0.5rem;
  margin: 0.125rem;
  font-size: 0.8125rem;
}

body.entegra-tabler .select2-container--default .select2-selection--multiple .select2-search__field {
  margin: 0;
  padding: 0;
  height: 1.4285714286em;
  font-size: 0.875rem;
}

/* "Tüm Satışlar" filter card body (#sell_filters_body, this page's own wrapper
   id - see sell/index.blade.php). sell.partials.sell_list_filters is shared
   with 3 other, still non-Tabler pages and is left untouched there, but it
   still emits bare Bootstrap-3 .form-group/<label> markup with none of
   Tabler's own .form-label/.mb-3 spacing classes, which read as label and
   input value running together. Scoped to the Tabler app shell
   (body.entegra-tabler) so those 3 other pages are unaffected. */
body.entegra-tabler #sell_filters_body .form-group {
  margin-bottom: 1rem;
}

body.entegra-tabler #sell_filters_body label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tblr-body-color, inherit);
}

body.entegra-tabler #sell_filters_body .checkbox {
  margin-top: 0.5rem;
}

/* ==========================================================================
   "Tüm Satışlar" (sell/index.blade.php, wrapped in .sell-page) — DataTables
   default chrome, scoped to body.entegra-tabler .sell-page. The table no
   longer uses a custom dom ('rt') with hand-built length/search/info/
   pagination controls; DataTables renders its own default toolbar (dom
   'lfrtip') inside #sell_table_wrapper instead. The plugin's default markup
   has no Tabler classes and no DataTables CSS bundle is loaded on this
   layout, so these scoped rules make the default controls usable inside the
   Tabler card (top length/search row, bottom info/pagination row, totals
   <tfoot>). Only classes DataTables itself generates are styled - no shared
   Tabler/global class (.row/.col-*/.btn/.table/.form-control/.modal/
   .dropdown/.input-group) is overridden anywhere.
   ========================================================================== */
body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_length,
body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 1rem 0;
  font-size: 0.8125rem;
  color: var(--entegra-muted);
}

body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_length {
  float: left;
}

body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_filter {
  float: right;
}

body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_length label,
body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_length select {
  display: inline-block;
  width: auto;
  height: 2.25rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border: 1px solid var(--tblr-border-color, #dce1e7);
  border-radius: var(--tblr-border-radius, 4px);
  background-color: var(--tblr-bg-surface, #fff);
  color: var(--tblr-body-color, inherit);
}

body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_filter input {
  display: inline-block;
  width: auto;
  height: 2.25rem;
  margin-left: 0.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--tblr-border-color, #dce1e7);
  border-radius: var(--tblr-border-radius, 4px);
  background-color: var(--tblr-bg-surface, #fff);
  color: var(--tblr-body-color, inherit);
}

/* Totals row (baseline <tfoot> restored in sell/index.blade.php; the
   untouched footerCallback populates these cells by class). scrollX clones
   the tfoot into the DataTables scroll area, so both the original and the
   clone are matched via #sell_table_wrapper. */
body.entegra-tabler .sell-page #sell_table_wrapper tfoot td {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--entegra-text);
}

body.entegra-tabler .sell-page #sell_table_wrapper tfoot td:first-child {
  text-align: left;
}

body.entegra-tabler .sell-page #sell_table_wrapper tfoot td:first-child strong {
  font-weight: 600;
}

/* Bottom info/pagination row: keep the default info + pagination usable
   inside the card (the generic .dataTables_wrapper rules above already
   float/space them; this only adds a little separation from the scroll
   area's bottom border). */
body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_scroll + .dataTables_info,
body.entegra-tabler .sell-page #sell_table_wrapper .dataTables_scroll + .dataTables_paginate {
  margin-top: 0.375rem;
}

/* ==========================================================================
   Shared ENTEGRA shell components (launcher, menu tree, shortcut bar, subnav)
   Dashboard runtime (body.entegra-tabler). The legacy runtime carries the
   same component CSS scoped under .entegra-tabler-skin in
   entegra-tabler-theme.css.
   ========================================================================== */

/* Second header row: [Menü] + shortcut bar ------------------------------ */
.entegra-subnav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.entegra-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  font-weight: 600;
}

.entegra-menu-btn .ti {
  font-size: 1.15rem;
}

/* Shortcut bar ---------------------------------------------------------- */
.entegra-shortcut-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0;
}

.entegra-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid var(--entegra-border);
  border-radius: 999px;
  background: var(--entegra-surface);
  color: var(--entegra-text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.entegra-shortcut:hover,
.entegra-shortcut:focus {
  border-color: color-mix(in srgb, var(--entegra-primary) 35%, var(--entegra-border));
  background: color-mix(in srgb, var(--entegra-primary) 6%, var(--entegra-surface));
  color: var(--entegra-primary);
  text-decoration: none;
}

.entegra-shortcut.is-active {
  border-color: color-mix(in srgb, var(--entegra-primary) 30%, var(--entegra-border));
  color: var(--entegra-primary);
}

.entegra-shortcut-title {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.entegra-shortcut .entegra-node-icon,
.entegra-shortcut .entegra-node-icon svg {
  flex: 0 0 auto;
}

.entegra-shortcut-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.entegra-shortcut-caret {
  display: inline-flex;
  color: var(--entegra-muted);
  font-size: 0.75rem;
}

.entegra-shortcut-menu {
  position: absolute;
  z-index: 1050;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 17rem;
  max-width: min(22rem, 90vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--entegra-border);
  border-radius: 0.5rem;
  background: var(--entegra-surface);
  box-shadow: 0 0.75rem 2rem rgba(24, 36, 51, 0.14);
}

.entegra-shortcut-dropdown.is-open .entegra-shortcut-menu {
  display: block;
}

.entegra-shortcut-empty {
  padding: 0.25rem 0.5rem;
}

/* App launcher ---------------------------------------------------------- */
.entegra-launcher {
  position: fixed;
  inset: 0;
  z-index: 1080;
  visibility: hidden;
  pointer-events: none;
}

.entegra-launcher.is-open {
  visibility: visible;
  pointer-events: auto;
}

.entegra-launcher-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.entegra-launcher.is-open .entegra-launcher-backdrop {
  opacity: 1;
}

.entegra-launcher-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  max-width: 26rem;
  margin: 0 auto;
  background: var(--entegra-surface);
  box-shadow: 0 0 3rem rgba(16, 24, 40, 0.28);
  transform: translateY(-1rem);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.entegra-launcher.is-open .entegra-launcher-panel {
  transform: translateY(0);
  opacity: 1;
}

.entegra-launcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem 0.65rem;
  border-bottom: 1px solid var(--entegra-border);
}

.entegra-launcher-title {
  font-size: 1rem;
  font-weight: 650;
  color: var(--entegra-text);
}

.entegra-launcher-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--entegra-muted);
  cursor: pointer;
}

.entegra-launcher-close:hover {
  background: var(--entegra-background);
  color: var(--entegra-text);
}

.entegra-launcher-search {
  position: relative;
  padding: 0.75rem 1rem 0.5rem;
}

.entegra-launcher-search-icon {
  position: absolute;
  top: 50%;
  left: 1.6rem;
  transform: translateY(-50%);
  color: var(--entegra-muted);
  display: inline-flex;
  pointer-events: none;
}

.entegra-launcher-search input {
  width: 100%;
  height: 2.4rem;
  padding: 0.375rem 0.75rem 0.375rem 2.5rem;
  border: 1px solid var(--entegra-border);
  border-radius: 0.5rem;
  background: var(--entegra-background);
  color: var(--entegra-text);
}

.entegra-launcher-search input:focus {
  outline: none;
  border-color: var(--entegra-primary);
  box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.12);
}

.entegra-launcher-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0.75rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.entegra-launcher-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--entegra-muted);
  font-size: 0.875rem;
}

body.entegra-launcher-open {
  overflow: hidden;
}

/* Menu tree ------------------------------------------------------------- */
.entegra-menu-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entegra-tree-node {
  display: block;
}

.entegra-tree-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.5rem;
  border-radius: 0.375rem;
}

.entegra-tree-row:hover {
  background: var(--entegra-background);
}

.entegra-tree-node.is-active > .entegra-tree-row {
  background: color-mix(in srgb, var(--entegra-primary) 8%, transparent);
}

.entegra-tree-toggle,
.entegra-tree-toggle-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.375rem 0.5rem;
  color: var(--entegra-text);
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 0.375rem;
}

.entegra-tree-toggle-title {
  min-height: 2.4rem;
}

.entegra-tree-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.375rem 0.5rem;
  color: var(--entegra-text);
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.375rem;
}

.entegra-tree-link:hover,
.entegra-tree-link:focus {
  color: var(--entegra-primary);
  text-decoration: none;
}

.entegra-tree-node.is-active > .entegra-tree-row .entegra-tree-link,
.entegra-tree-node.is-active > .entegra-tree-row .entegra-tree-toggle {
  color: var(--entegra-primary);
}

.entegra-tree-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entegra-tree-caret {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--entegra-muted);
  font-size: 0.875rem;
  transition: transform 0.15s ease;
}

.entegra-tree-node.is-expanded > .entegra-tree-row .entegra-tree-caret {
  transform: rotate(90deg);
}

.entegra-tree-children {
  margin-left: 1rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--entegra-border);
}

.entegra-tree-children[hidden] {
  display: none;
}

/* Pin control ----------------------------------------------------------- */
.entegra-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--entegra-muted);
  cursor: pointer;
}

.entegra-pin:hover {
  color: var(--entegra-warning);
  background: color-mix(in srgb, var(--entegra-warning) 10%, transparent);
}

.entegra-pin.is-pinned {
  color: var(--entegra-warning);
}

.entegra-pin.is-pinned .ti-star::before {
  content: "\eb2e";
}

/* Node icon sizing ------------------------------------------------------ */
.entegra-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
}

.entegra-node-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  max-width: 1.25rem;
  max-height: 1.25rem;
}

.entegra-node-icon i {
  font-size: 1.15rem;
  line-height: 1;
}

/* Header action buttons (icon-only, Tabler-neutral) --------------------- */
.entegra-action-icon {
  font-size: 1.1rem;
}

.entegra-date-link {
  color: var(--entegra-muted);
}

.entegra-date-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.entegra-return-link {
  color: var(--entegra-muted);
}

.entegra-return-label {
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Header quick-search results (Bootstrap 3 dropdown-menu has no .show rule) */
.entegra-header .dropdown-menu.show {
  display: block;
}

/* Responsive ------------------------------------------------------------ */
@media (min-width: 768px) {
  .entegra-launcher-panel {
    top: 3.5rem;
    bottom: auto;
    left: 1rem;
    right: auto;
    margin: 0;
    max-width: 24rem;
    max-height: calc(100vh - 4.5rem);
    border-radius: 0.75rem;
    border: 1px solid var(--entegra-border);
  }
}

@media (max-width: 575.98px) {
  .entegra-subnav {
    gap: 0.5rem;
  }

  .entegra-menu-btn-label {
    display: none;
  }

  .entegra-shortcut-title {
    max-width: 6rem;
  }

  .entegra-menu-btn {
    padding: 0.5rem 0.7rem;
  }
}
body.entegra-tabler .entegra-dashboard-greeting {
  font-size: clamp(1.5rem, 2.1vw, 2.125rem);
  line-height: 1.08;
  font-weight: 700;
}
