
/* ==========================================================================
   ERP «Дочкам та синочкам» – iOS Glass + Lucide skin for UIkit
   --------------------------------------------------------------------------
   Drop this file AFTER the standard uikit.css to get a soft glassmorphism
   look that matches macOS / iOS panels and Lucide icons.
   ========================================================================== */

:root {
  --erp-radius-lg: 20px;
  --erp-radius-xl: 24px;
  --erp-radius-pill: 999px;

  --erp-color-bg: #e5edf8;
  --erp-color-bg-alt: #eef2ff;
  --erp-color-surface: #ffffff;
  --erp-color-surface-strong: #ffffff;

  --erp-color-border-soft: rgba(148, 163, 184, 0.45);
  --erp-color-border-strong: rgba(15, 23, 42, 0.25);

  --erp-color-primary: #2563eb;
  --erp-color-primary-soft: rgba(37, 99, 235, 0.16);
  --erp-color-primary-strong: #1d4ed8;

  --erp-color-danger: #ef4444;
  --erp-color-success: #22c55e;
  --erp-color-muted: #94a3b8;

  --erp-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --erp-shadow-strong: 0 26px 80px rgba(15, 23, 42, 0.2);

  --erp-ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Global layout & background ---------------------------------- */

html {
  scroll-behavior: smooth;
}





/* ---------- Lucide icon polishing --------------------------------------- */

.uk-icon > svg {
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Top bar / navbar -------------------------------------------- */

.uk-navbar-container:not(.uk-navbar-transparent),
.uk-navbar-primary {
  background: linear-gradient(120deg,
      rgba(15, 23, 42, 0.90),
      rgba(15, 23, 42, 0.80));
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.32);
}

/* reduce navbar default padding a bit on dense screens */
.uk-navbar-container {
  padding-block: 10px;
}

/* ---------- Sidebar (when using .uk-nav-default inside a dark panel) ---- */

.uk-offcanvas-bar,
.uk-background-secondary,
.uk-section-secondary {
  background: radial-gradient(circle at 0 0, #1f2937 0, #020617 65%);
}

.uk-nav-default > li > a,
.uk-nav-primary > li > a {
  border-radius: 999px;
  padding-block: 9px;
  padding-inline: 14px;
  transition: background-color 0.18s var(--erp-ease-standard),
              color 0.18s var(--erp-ease-standard),
              transform 0.18s var(--erp-ease-standard);
}

.uk-nav-default > li.uk-active > a,
.uk-nav-primary > li.uk-active > a {
  background: radial-gradient(circle at 0 0,
    rgba(37, 99, 235, 0.25),
    rgba(37, 99, 235, 0.9));
  color: #eff6ff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.55);
  transform: translateY(-1px);
}

.uk-nav-default > li > a:hover,
.uk-nav-primary > li > a:hover {
  background: rgba(148, 163, 184, 0.16);
}

/* ---------- Glass cards -------------------------------------------------- */

.uk-card-default,
.uk-card-muted {
  position: relative;
  border-radius: var(--erp-radius-xl);
  background: var(--erp-color-surface);
  border: 1px solid var(--erp-color-border-soft);
  box-shadow: var(--erp-shadow-soft);

  overflow: hidden;
  transition:
    transform 0.18s var(--erp-ease-standard),
    box-shadow 0.18s var(--erp-ease-standard),
    border-color 0.18s ease-out,
    background-color 0.18s ease-out;
}

.uk-card-default::before,
.uk-card-muted::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.25), transparent 60%);
  opacity: 0.35;
  mix-blend-mode: soft-light;
}



/* compact header titles */
.uk-card-title {
  letter-spacing: 0.01em;
}

/* ---------- Inputs & selects -------------------------------------------- */

.uk-input,
.uk-select,
.uk-textarea {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition:
    background-color 0.16s var(--erp-ease-standard),
    border-color 0.16s var(--erp-ease-standard),
    box-shadow 0.16s var(--erp-ease-standard),
    transform 0.16s var(--erp-ease-standard);
}

.uk-input::placeholder,
.uk-textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.uk-input:focus,
.uk-select:focus,
.uk-textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--erp-color-primary);
  box-shadow:
    0 0 0 1px var(--erp-color-primary-soft),
    0 0 0 2.5px rgba(191, 219, 254, 0.9);
  transform: translateY(-0.5px);
}

/* Search-style input pills */
.uk-search-input,
.uk-input.uk-form-large {
  border-radius: var(--erp-radius-pill);
}

/* readonly / disabled inputs */
.uk-input[readonly],
.uk-input:disabled,
.uk-select:disabled,
.uk-textarea:disabled {
  background: rgba(248, 250, 252, 0.9);
  color: #94a3b8;
  cursor: not-allowed;
}

/* ---------- Buttons ------------------------------------------------------ */

.uk-button {
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-inline: 18px;
  padding-block: 7px;
  transition:
    background-color 0.16s var(--erp-ease-standard),
    border-color 0.16s var(--erp-ease-standard),
    transform 0.16s var(--erp-ease-standard),
    box-shadow 0.16s var(--erp-ease-standard);
}

.uk-button-primary {
  background-image: linear-gradient(135deg, var(--erp-color-primary), #4f46e5);
  border-color: transparent;
  color: #eff6ff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.45);
}

.uk-button-primary:hover {
  background-image: linear-gradient(135deg, var(--erp-color-primary-strong), #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.60);
}

.uk-button-default,
.uk-button-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.uk-button-default:hover,
.uk-button-secondary:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

.uk-button-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: transparent;
  color: #fef2f2;
}

/* subtle press effect */
.uk-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* ---------- Tables & list rows ------------------------------------------ */

.uk-table {
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--erp-radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uk-table th {
  font-weight: 500;
  text-transform: none;
  font-size: 13px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.9);
}

.uk-table tbody tr {
  transition:
    background-color 0.14s var(--erp-ease-standard),
    transform 0.12s var(--erp-ease-standard);
}

.uk-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.9);
  transform: translateY(-1px);
}

/* rounded corners for first/last rows */
.uk-table tbody tr:first-child td:first-child {
  border-top-left-radius: var(--erp-radius-lg);
}
.uk-table tbody tr:first-child td:last-child {
  border-top-right-radius: var(--erp-radius-lg);
}
.uk-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--erp-radius-lg);
}
.uk-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--erp-radius-lg);
}

/* ---------- Status badges for orders / invoices ------------------------- */

.badge-status,
[data-status] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding-inline: 0.75rem;
  padding-block: 0.25rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.03);
}

.badge-status[data-status="new"],
[data-status="new"] {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.24);
  color: #1d4ed8;
}

.badge-status[data-status="packing"],
[data-status="packing"] {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.30);
  color: #4f46e5;
}

.badge-status[data-status="sent"],
[data-status="sent"] {
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(14, 165, 233, 0.28);
  color: #0369a1;
}

.badge-status[data-status="delivered"],
[data-status="delivered"] {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.32);
  color: #15803d;
}

.badge-status[data-status="returned"],
[data-status="returned"] {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.55);
  color: #4b5563;
}

.badge-status[data-status="cancelled"],
[data-status="cancelled"] {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #b91c1c;
}

/* ---------- Page shell / soft entrance animations ---------------------- */

.erp-page-shell {
  opacity: 0;
  transform: translateY(8px);
  animation: erpPageIn 0.26s var(--erp-ease-standard) forwards;
}

@keyframes erpPageIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* if JS adds .erp-page-shell--instant we skip the entrance animation */
.erp-page-shell.erp-page-shell--instant {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

/* Optional skeleton shimmer for async-loaded blocks */
.erp-skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
      120deg,
      rgba(226, 232, 240, 0.85),
      rgba(241, 245, 249, 0.9)
  );
}

.erp-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      120deg,
      transparent,
      rgba(255, 255, 255, 0.75),
      transparent
  );
  transform: translateX(-100%);
  animation: erpSkeleton 1.1s linear infinite;
}

@keyframes erpSkeleton {
  to {
    transform: translateX(100%);
  }
}

/* ---------- Misc. small tweaks ----------------------------------------- */

.uk-label {
  border-radius: 999px;
  padding-inline: 0.7rem;
  padding-block: 0.25rem;
}

/* Reduce motion for people who don't like fancy animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------- ГОЛОВНА: стилі модуля -------------------- */

.erp-home {
  margin-top: 24px;
}

/* Хедер (тільки заголовок + кнопки) */
.erp-home-header-card {
  padding: 14px 18px;
}

.erp-home-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.erp-home-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.06);
}

.erp-home-header-icon [data-lucide] svg,
.erp-home-header-icon svg {
  width: 20px;
  height: 20px;
}

.erp-home-header-sub {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.erp-home-header-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.erp-home-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* KPI картки */

.erp-home-kpi-grid {
  margin-top: 10px;
}

.erp-home-kpi-card {
  border-radius: 16px;
  padding: 12px 14px;
}

.erp-home-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.erp-home-kpi-value {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.erp-home-kpi-sub {
  font-size: 12px;
  color: #6b7280;
}

.erp-home-kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.08);
  color: #4b5563;
}

/* Карти секцій */

.erp-home-section-card {
  padding: 14px 16px;
  border-radius: 18px;
}

.erp-home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.erp-home-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.erp-home-section-title i[data-lucide] svg,
.erp-home-section-title svg.lucide {
  width: 18px;
  height: 18px;
}

/* Таблиці */

.erp-home-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.erp-home-table thead th {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.9);
}

.erp-home-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  vertical-align: middle;
}

.erp-home-table tbody tr:last-child td {
  border-bottom: none;
}

.erp-home-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.9);
}

/* Номер документу */

.erp-pill-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(226, 232, 240, 0.6);
  cursor: pointer;
}

.erp-pill-number i[data-lucide] svg,
.erp-pill-number svg.lucide {
  width: 14px;
  height: 14px;
}

/* Порожній стан */

.erp-home-empty {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

.erp-home-empty-icon {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
}

/* -------- Products: картки однакової висоти -------- */

/* Щоб UIkit міг рівняти висоту по елементу-обгортці */
.erp-products-grid > div {
  display: flex;
}

/* Сама картка заповнює всю висоту грід-ячейки */
.erp-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Основний контент розтягується, футер прилипає донизу */
.erp-product-main {
  flex: 1 1 auto;
}

/* Трошки відступу між основною частиною та футером, якщо його ще немає */
.erp-product-footer {
  margin-top: 8px;
}



/* Контейнер нотифікацій UIkit справа знизу */
.uk-notification-bottom-right {
  padding: 16px;
  z-index: 1200;
}

/* Обгортка одного тоста в нашому стилі */
.uk-notification-message.erp-toast {
  border-radius: 18px;
  padding: 10px 14px;
  min-width: 260px;
  max-width: 360px;

  /* iOS / glass фон */
  background:
          radial-gradient(circle at 0% 0%, rgba(96, 165, 250, 0.22), transparent 55%),
          radial-gradient(circle at 100% 0%, rgba(52, 211, 153, 0.18), transparent 55%),
          rgba(15, 23, 42, 0.90); /* темне скло */



  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
          0 18px 45px rgba(15, 23, 42, 0.75),
          0 0 0 1px rgba(15, 23, 42, 0.8);

  color: #e5e7eb;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

/* Варіації за статусом (легкі акценти по краю) */
.uk-notification-message-primary.erp-toast {
  border-color: rgba(96, 165, 250, 0.75);
}

.uk-notification-message-success.erp-toast {
  border-color: rgba(52, 211, 153, 0.75);
}

.uk-notification-message-warning.erp-toast {
  border-color: rgba(250, 204, 21, 0.85);
}

.uk-notification-message-danger.erp-toast {
  border-color: rgba(248, 113, 113, 0.85);
}

/* Внутрішній контент тоста */
.erp-toast-body {
  flex: 1;
}

.erp-toast-title {
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.erp-toast-text {
  opacity: 0.9;
}

/* Якщо захочеш додавати іконку зліва — буде готове місце */
.erp-toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.2), rgba(148,163,184,0.32));
  box-shadow: 0 8px 18px rgba(15,23,42,0.55);
  margin-right: 4px;
}

.erp-toast-icon i {
  width: 16px;
  height: 16px;
}




/* ======================= PRODUCTS: CARD VIEW ======================= */

/* Грід карток — кожна колонка тягне картку на всю висоту, як у KPI */
.erp-products-grid > div {
  display: flex;
}

/* Основна картка товару */
.erp-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 18px;
  padding: 12px 14px 12px;
  background:
          linear-gradient(145deg, #7b2ff7 0%, #f107a3 50%, #ff6584 100%);
  border: 0;
  box-shadow:
          0 18px 44px rgba(0, 0, 0, 0.25);
  overflow: hidden;

  transition:
          transform 0.12s ease,
          box-shadow 0.12s ease,
          background 0.12s ease;
}

.erp-product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
          radial-gradient(120% 80% at 25% 110%, rgba(255,255,255,0.25), transparent 55%),
          radial-gradient(120% 80% at 80% 120%, rgba(255,255,255,0.18), transparent 60%),
          radial-gradient(circle at 18% 16%, rgba(255,255,255,0.55), transparent 35%),
          radial-gradient(circle at 82% 10%, rgba(255,255,255,0.18), transparent 42%),
          linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
  pointer-events: none;
}

.erp-product-card:hover {
  transform: translateY(-2px);
  box-shadow:
          0 18px 42px rgba(15, 23, 42, 0.16),
          0 0 0 1px rgba(191, 219, 254, 0.85) inset;
}

/* Верхня секція: статус + кількість */
.erp-product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

/* Статусний чіп (аналог статусів у накладних) */
.erp-product-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.erp-product-status-chip i[data-lucide] svg,
.erp-product-status-chip svg {
  width: 13px;
  height: 13px;
}

/* Модифікатори статусу */
.erp-product-status-chip--archived {
  background: rgba(255,255,255,0.22);
  color: #f1f5f9;
}

.erp-product-status-chip--draft {
  background: rgba(255,255,255,0.22);
  color: #f1f5f9;
}

/* Чіп кількості праворуч */
.erp-product-qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.erp-product-qty-chip i[data-lucide] svg,
.erp-product-qty-chip svg {
  width: 13px;
  height: 13px;
}

/* Основний блок картки: фото + текст */
.erp-product-main {
  display: flex;
  gap: 10px;
  padding-top: 2px;
  padding-bottom: 6px;
  flex: 1 1 auto; /* тягнемо, щоб футер був притиснутий донизу */
}
/* Мініатюра товару — строго квадрат 1:1 */
.erp-product-thumb {
  flex: 0 0 80px;       /* фіксована ширина колонки */
  width: 80px;
  height: 80px;         /* така ж висота = квадрат */
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background:
          radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.18), transparent 55%),
          radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.14), transparent 55%),
          #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
}
.erp-product-thumb--cover {
  background: #f7f9fb;
  border: 1px solid #e5e7eb;
}
.erp-product-thumb-imgtag {
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(15,23,42,0.08);
}
.erp-product-thumb-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.erp-product-thumb-imgtag {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
  padding: 6px;
}
.erp-product-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px dashed #e2e8f0;
}
.erp-product-thumb-placeholder i[data-lucide],
.erp-product-thumb-placeholder svg {
  width: 26px;
  height: 26px;
  color: #9ca3af;
}

/* Картинка займає весь квадрат, обрізається по краях */
.erp-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Іконка-заглушка по центру квадрата */
.erp-product-thumb i[data-lucide],
.erp-product-thumb svg {
  width: 26px;
  height: 26px;
  color: #e5e7eb;
}
/* Дві іконки у футері картки товару */
.erp-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Трошки компактніші круглі кнопки спеціально для карток товарів */
.erp-product-actions .erp-icon-button--small {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Іконки всередині маленьких кнопок */
.erp-product-actions .erp-icon-button--small i[data-lucide] svg,
.erp-product-actions .erp-icon-button--small svg {
  width: 16px;
  height: 16px;
}

/* --- CodePen-style product card (Nike Air Max) --- */
.erp-product-card,
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
  min-height: 20px;
}
.product-card__badges {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 14px;
  pointer-events: none;
  z-index: 2;
}
.product-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.5rem;
  font-weight: 700;
  color: #333;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: none;
  pointer-events: auto;
}
.product-card__badge-group {
  display: inline-flex;
  gap: 6px;
}
.product-card__badge-group--left {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.product-card__badge-group--right {
  flex-direction: column;
  align-items: flex-end;
}
.product-card__badge--sale {
  border: none;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
}
.product-card__badge--sale-promo {
  background: rgba(37, 99, 235, 0.92);
}
.product-card__badge--sale-clearance {
  background: rgba(234, 88, 12, 0.92);
}
.product-card__badge--reserve {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.28);
  color: #92400e;
}
.product-card__badge--left {
  background: rgba(255, 255, 255, 0.82);
}
.product-card__badge--right {
  background: rgba(255, 255, 255, 0.82);
}
.product-card__badge i[data-lucide],
.product-card__badge svg {
  width: 12px;
  height: 12px;
}
.erp-product-card:hover,
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.product-card__image,
.erp-product-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #f5f5f7;
}
.product-card__image img,
.erp-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-card__image img,
.erp-product-card:hover .erp-product-img img {
  transform: scale(1.05);
}
.product-card__placeholder {
  width: 100%;
  height: 100%;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 18px;
}
.product-card__info,
.erp-product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  height: 30%;
}
.product-card__meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 4px;
  justify-content: center;
}
.product-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  color: #374151;
  font-size: 0.65rem;
  font-weight: 600;
}
.product-card__meta-item i[data-lucide],
.product-card__meta-item svg {
  width: 14px;
  height: 14px;
}
.product-card__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.product-card__title-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.3), rgba(148,163,184,0.32));
  box-shadow: 0 6px 12px rgba(15,23,42,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f2937;
}
.product-card__title-icon i[data-lucide],
.product-card__title-icon svg {
  width: 14px;
  height: 14px;
}
.product-card__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}
.product-card__top,
.erp-product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.product-card__title,
.erp-product-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.product-card__description,
.erp-product-desc {
  font-size: 0.5rem;
  color: #666;
  margin: 0;
}
.product-card__meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.product-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  color: #374151;
  font-size: 0.7rem;
  font-weight: 600;
}
.product-card__meta-item i[data-lucide],
.product-card__meta-item svg {
  width: 14px;
  height: 14px;
}
.product-card__price-row,
.erp-product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 8px;
  min-height: 44px;
}
.product-card__price-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.9), rgba(254, 215, 170, 0.9));
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(251, 146, 60, 0.25);
}
.product-card__price-pill .erp-price-pair {
  gap: 10px;
}
.product-card__price-pill .erp-price-old {
  opacity: 0.65;
  font-size: 0.75rem;
}
.product-card__price-pill .erp-price-new {
  font-size: 1rem;
  font-weight: 800;
}
.product-card__price-val {
  font-size: 1rem;
  font-weight: 800;
}
.product-card__price-curr {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
}
.product-card__btn,
.erp-product-btn {
  background-color: #d83344;
  color: #fff;
  border: none;
  padding: 6px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.12s ease;
  text-decoration: none;
  display: inline-block;
}
.product-card__btn--primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
}
.product-card__btn--ghost {
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: none;
}
.product-card__btn:hover,
.erp-product-btn:hover {
  background-color: #c71729;
  transform: translateY(-1px);
}
.product-card__stock,
.erp-product-stock {
  font-size: 0.85rem;
  color: #666;
}
.product-card__actions {
  display: flex;
  gap: 8px;
}
.product-card__action-btn {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  transition: all 0.12s ease;
  cursor: pointer;
  padding: 0;
}
.product-card__action-btn--primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
  color: #fff;
}
.product-card__action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
.product-card__action-btn i[data-lucide],
.product-card__action-btn svg {
  width: 14px;
  height: 14px;
}
.product-card__title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 80%);
  backdrop-filter: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.product-card__badge--status-in {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  border: none;
}
.product-card__badge--status-out {
  background: rgba(107, 114, 128, 0.9);
  color: #fff;
  border: none;
}
.product-card__badge--qty-low {
  background: rgba(248, 113, 113, 0.9);
  color: #fff;
  border: none;
}
@media (max-width: 480px) {
  .product-card__image,
  .erp-product-img { height: 200px; }
  .product-card__title,
  .erp-product-title { font-size: 1.3rem; }
  .product-card__description,
  .erp-product-desc { font-size: 0.8rem; }
  .product-card__price,
  .erp-product-price { font-size: 1.1rem; }
  .product-card__btn,
  .erp-product-btn { padding: 8px 16px; font-size: 0.8rem; }
}


/* Тулбар в модальних вікнах (чек замовлення) */
.erp-modal-toolbar {
  gap: 8px;
}

.erp-modal-toolbar .uk-button {
  min-width: 140px;
}


/* Текстова частина */
.erp-product-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Назва товару */
.erp-product-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Маленькі мета-дані (арт., модель, колір, розмір) */
.erp-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.82);
}

.erp-product-meta span {
  white-space: nowrap;
}

/* Ціни */
.erp-product-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.erp-product-price-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  border: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.erp-product-price-pill--retail {
  background: rgba(255,255,255,0.26);
  color: #ffffff;
  border: 0;
}

/* Футер: ID + дія */

/* ======================= ERP TABS (SECONDARY) ======================= */

.uk-tab.erp-tabs-secondary {
  border-bottom: none;
  gap: 4px;
}

.uk-tab.erp-tabs-secondary > li {
  padding-left: 0;
  padding-right: 0;
}

.uk-tab.erp-tabs-secondary > li > a {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  border: none;
  transition:
          background-color 0.12s ease,
          color 0.12s ease,
          box-shadow 0.12s ease,
          transform 0.08s ease;
}

.uk-tab.erp-tabs-secondary > li > a i[data-lucide],
.uk-tab.erp-tabs-secondary > li > a svg {
  vertical-align: middle;
}

.uk-tab.erp-tabs-secondary > li.uk-active > a {
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  box-shadow:
          0 0 0 1px rgba(191, 219, 254, 0.95),
          0 8px 20px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.uk-tab.erp-tabs-secondary > li > a:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #111827;
}


/* ERP timeline */
/* ================== ERP TIMELINE ================== */

.erp-timeline {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  position: relative;
}

.erp-timeline-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 18px;
}

.erp-timeline-item::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid rgba(59,130,246,0.55);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
}
.erp-timeline-item::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 28px;
  width: 2px;
  height: calc(100% - 10px);
  background: linear-gradient(180deg, rgba(148,163,184,0.45), rgba(148,163,184,0.15));
}

.erp-timeline-item:last-child .erp-timeline-line {
  height: 0;
}
.erp-timeline-item:last-child::after {
  height: 0;
}
.erp-timeline-item.is-visible-last .erp-timeline-line {
  height: 0;
}
.erp-timeline-item.is-visible-last::after {
  height: 0;
}

.erp-timeline-dot {
  position: absolute;
  left: 22px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid rgba(59,130,246,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
}

.erp-timeline-dot i[data-lucide],
.erp-timeline-dot svg {
  width: 0;
  height: 0;
}

.erp-timeline-line {
  position: absolute;
  left: 29px;
  top: 28px;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(148,163,184,0.45), rgba(148,163,184,0.15));
}

.erp-timeline-content {
  padding: 2px 0;
}

.erp-timeline-header {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
}

.erp-timeline-date {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
  min-width: 52px;
  text-align: right;
  letter-spacing: 0.02em;
}

.erp-timeline-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(59,130,246,0.08);
  color: #1d4ed8;
  border: 1px solid rgba(59,130,246,0.15);
}

.erp-timeline-text {
  margin-top: 6px;
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.45;
}

.erp-timeline-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}

/* Плаваюча панель пагінації замовлень над футером */
/* Трохи запасу під липку пагінацію, щоб останній рядок не ховався */
.erp-orders-table-wrap {
  padding-bottom: 72px; /* висота панелі пагінації + запас */
}

/* Липка панель пагінації над футером */
.erp-orders-pagination-sticky {
  position: sticky;
  bottom: 50px;          /* прилипає до нижнього краю viewport */
  z-index: 0;
  margin-top: 4px;
}
.erp-orders-pagination-sticky {
  position: sticky;
  bottom: 50px;
  z-index: 0;
  margin-top: 4px;

  /* плавна поява/зникання */
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* прихований стан панелі */
.erp-orders-pagination-sticky.erp-pagination-hidden {
  opacity: 0;
  transform: translateY(16px); /* трохи “сповзає” вниз */
  pointer-events: none;        /* щоб не ловила кліки, коли схована */
}
/* Липка панель пагінації замовлень над футером */
.erp-orders-pagination-sticky {
  position: sticky;
  bottom: 50px;          /* як ти вже виставив */
  z-index: 0;
  margin-top: 4px;

  /* плавна поява/зникнення */
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Карта з таблицею: додаємо запас знизу під панель пагінації */
.erp-table-wrap {
  padding-bottom: 72px; /* вистачає для панелі, щоб не ховати останній рядок */
}

/* Липка панель пагінації над футером для всіх сторінок */
.erp-pagination-sticky {
  position: sticky;
  bottom: 50px;          /* відрив від низу viewport */
  z-index: 0;
  margin-top: 4px;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Прихований стан (при прокрутці вгору) */
.erp-pagination-sticky.erp-pagination-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

/* Центрування модалок по вертикалі (додатково до uk-margin-auto-vertical) */
.erp-modal-dialog {
  margin-top: auto !important;
  margin-bottom: auto !important;
}
