/* ============================================
   SKLAD-BUMAGA — Base Styles
   ============================================ */

/* ── Reset ─────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--bg);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

/* ── Custom scrollbar ──────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* ── Links ─────────────────────────────────── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ── Headings ──────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }

/* ── Selection ─────────────────────────────── */
::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

/* ── Utilities ─────────────────────────────── */
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.text-primary   { color: var(--primary); }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.text-sm        { font-size: var(--font-size-sm); }
.text-xs        { font-size: var(--font-size-xs); }
.font-mono      { font-family: var(--font-mono); }
.font-display   { font-family: var(--font-display); }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.hidden { display: none !important; }
.d-block { display: block; }

.input-w-110 { max-width: 110px; }
.input-w-120 { max-width: 120px; }
.cell-max-140 { max-width: 140px; }
.cell-max-160 { max-width: 160px; }
.cell-max-180 { max-width: 180px; }
.cell-max-200 { max-width: 200px; }

.order-number-with-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.order-paid-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success-light);
  flex-shrink: 0;
}

.order-unpaid-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger-light);
  flex-shrink: 0;
}

/* ── Badges ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--slate-600);
  line-height: 1.5;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-100); color: var(--primary-700); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-info    { background: var(--info-light); color: var(--info); }
.badge-accent  { background: var(--accent-light); color: var(--accent); }

/* ── Status badges (orders, reserves, etc.) ─ */
.status-new {
  background: var(--info-light);
  color: var(--info);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.15);
}

.status-on_order {
  background: #ffedd5;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.16);
}

.status-confirmed {
  background: var(--primary-100);
  color: var(--primary-700);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.status-picking {
  background: var(--warning-light);
  color: var(--warning);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.status-partially_shipped {
  background: #fef3c7;
  color: #b45309;
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.12);
}

.status-shipped {
  background: var(--success-light);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.15);
}

.status-closed {
  background: var(--slate-100);
  color: var(--slate-500);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.12);
}

.status-cancelled {
  background: var(--danger-light);
  color: var(--danger);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.status-active {
  background: var(--success-light);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.15);
}

.status-released {
  background: var(--slate-100);
  color: var(--slate-500);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.12);
}

.status-draft {
  background: var(--slate-100);
  color: var(--slate-600);
  box-shadow: inset 0 0 0 1px rgba(71, 85, 105, 0.1);
}

.status-completed {
  background: var(--success-light);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.15);
}

.status-in_progress {
  background: var(--warning-light);
  color: var(--warning);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.status-pending_approval {
  background: var(--info-light);
  color: var(--info);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.15);
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-xs);
}

.card-compact {
  padding: 0.75rem;
}

.card-elevated-muted {
  background: var(--bg-elevated);
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}

/* ── Stat cards grid ───────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent), #14b8a6);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--warning), #f59e0b);
}

.stat-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--info), #38bdf8);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--primary-50);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.stat-card:nth-child(2) .stat-icon { background: var(--accent-light); color: var(--accent); }
.stat-card:nth-child(3) .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-card:nth-child(4) .stat-icon { background: var(--info-light); color: var(--info); }

.stat-card .stat-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.25;
}

.stat-card .stat-sub {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.employee-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.employee-detail-card .stat-card {
  min-width: 0;
}

.production-totals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.production-total-card {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  box-shadow: var(--shadow-sm);
}

.production-total-label {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.production-total-value {
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .production-totals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .production-totals-grid {
    grid-template-columns: 1fr;
  }
}

.employee-detail-card .employee-card-table th,
.employee-detail-card .employee-card-table td {
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 1024px) {
  .employee-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .employee-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard data widgets ────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Page structure ────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.sku-filters-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.sku-filters-row > * {
  flex: 0 0 auto;
}

.sku-filters-row select {
  width: 120px;
}

.sku-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
}

.sku-filters-line {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}

.sku-filters-line > * {
  flex: 0 0 auto;
}

.sku-filters-line select,
.sku-filters-line input {
  width: auto;
  min-width: 0;
  padding: 0.375rem 0.5rem;
  font-size: var(--font-size-xs);
}

.sku-filters-line select {
  padding-right: 1.75rem;
}

.filters-single-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.filters-single-row > * {
  flex: 0 0 auto;
}

.filters-single-row select {
  width: auto;
  min-width: 170px;
}

/* ── Pagination ────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 1.5rem;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  font-weight: 600;
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0 0.75rem;
  font-weight: 500;
}

/* ── Toast notifications ───────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--slate-400);
  min-width: 320px;
  max-width: 460px;
  animation: toast-in var(--duration-slow) var(--ease-out);
  font-size: var(--font-size-sm);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info    { border-left-color: var(--info); }

.toast-close {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1;
  padding: 2px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toast-close:hover {
  background: var(--slate-100);
  color: var(--text-secondary);
}

@keyframes toast-in {
  0%   { opacity: 0; transform: translateX(40px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(40px); }
}

/* ── Login screen ──────────────────────────── */
.landing-screen,
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  padding: 1.5rem;
}

.landing-screen {
  z-index: 20;
}

.landing-screen__content {
  text-align: center;
}

.landing-screen__message {
  color: #111;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.landing-screen__examples {
  margin: 0;
  color: #444;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.8;
  font-family: "Courier New", Courier, monospace;
}

.landing-screen__line {
  white-space: nowrap;
}

.landing-token--label {
  color: #5f6b7a;
}

.landing-token--call {
  color: #1f6feb;
}

.landing-token--string {
  color: #b65f0b;
}

.landing-token--tag {
  color: #0f8b6f;
}

.landing-token--plain {
  color: #2f3540;
}

.login-screen::before {
  display: none;
}

.login-form {
  width: min(100%, 18rem);
  display: grid;
  gap: 1.1rem;
}

@media (max-width: 480px) {
  .login-form {
    width: min(100%, 16rem);
  }
}

@keyframes login-appear {
  0%   { opacity: 0; transform: translateY(24px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-field {
  margin: 0;
}

.login-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: #8f8f8f;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-field input {
  padding: 0.5rem 0;
  border: none;
  border-bottom: 1px solid #d6d6d6;
  border-radius: 0;
  background: transparent;
  color: #111;
  box-shadow: none;
}

.login-field input:hover:not(:focus):not(:disabled) {
  border-color: #bdbdbd;
}

.login-field input:focus {
  border-color: #111;
  box-shadow: none;
  background: transparent;
}

.login-field input::placeholder {
  color: transparent;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 2.4rem;
  height: 2.4rem;
  margin-top: 0.3rem;
  border: 1px solid #dadada;
  border-radius: 999px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.login-submit:hover {
  border-color: #111;
  color: #111;
}

.login-submit:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.login-submit:active {
  transform: translateX(1px);
}

#login-error {
  min-height: 0;
  margin: 0;
  color: transparent;
}

/* ── Empty state ───────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.empty-state svg {
  color: var(--slate-300);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.empty-state p {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  max-width: 360px;
  margin: 0 auto;
}

/* ── Loading / Spinner ─────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--slate-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin-right: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Tabs ──────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.tab {
  position: relative;
  padding: 0.7rem 1rem;
  font-size: var(--font-size-sm);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  margin-bottom: -1px;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.tabs-wrap {
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
  border-bottom-color: var(--bg-card);
}

.tab.active::after {
  content: none;
}

/* ── Detail page info grid ─────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: var(--font-size-2xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-display);
}

.detail-value {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text);
}

/* ── Comments section ──────────────────────── */
.comment-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  font-size: var(--font-size-xs);
}

.comment-author {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
}

.comment-date {
  color: var(--text-muted);
}

.comment-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Order history details ────────────────── */
.history-detail-summary {
  font-weight: 600;
  color: var(--text-secondary);
}

.history-detail-list {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
}

.history-detail-list li {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.35;
}

.history-detail-more {
  margin-top: 0.2rem;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ── Divider ───────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ── Page transitions ──────────────────────── */
@keyframes page-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

#content > * {
  animation: page-in var(--duration-slow) var(--ease-out);
}

/* ── Import Preview Wizard ──────────────────── */
.import-preview {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 0.875rem 1rem;
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.preview-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
}

.preview-info-label {
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Column mapping ────────────────────────── */
.mapping-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--bg-card);
}

.mapping-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.625rem;
}

.mapping-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mapping-item label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.mapping-required label {
  color: var(--text);
}

.mapping-missing {
  background: rgba(239, 68, 68, 0.06);
  border-radius: var(--radius);
  padding: 0.375rem;
  margin: -0.375rem;
}

.mapping-missing label {
  color: var(--danger);
}

.mapping-select {
  font-size: var(--font-size-sm);
  padding: 0.375rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.mapping-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-ghost);
}

/* ── Preview table ─────────────────────────── */
.preview-table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.preview-select-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.preview-table-wrapper {
  max-height: 420px;
  overflow: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.preview-table-wrapper-compact {
  max-height: 320px;
}

.col-check-fixed {
  width: 36px;
}

.preview-data-table {
  font-size: 0.8125rem;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.preview-data-table th,
.preview-data-table td {
  white-space: nowrap;
}

.preview-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--slate-50);
}

.preview-data-table .col-check {
  width: 36px;
  text-align: center;
}

.preview-data-table .col-num {
  width: 40px;
  text-align: center;
  font-size: 0.75rem;
}

.preview-data-table th .th-mapped {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.preview-data-table tr.row-deselected {
  opacity: 0.42;
  background: var(--slate-50);
}

.preview-data-table tr.row-deselected td {
  text-decoration: none;
}

.preview-horizontal-scroll {
  position: sticky;
  top: 0;
  z-index: 4;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg-card);
  margin-bottom: -1px;
}

.preview-horizontal-scroll-inner {
  height: 1px;
}

/* ── Editable cell ─────────────────────────── */
.editable-cell {
  cursor: text;
  position: relative;
  min-width: 60px;
}

.editable-cell:hover {
  background: var(--primary-ghost);
}

.cell-edit-input {
  width: 100%;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.375rem;
  font-size: inherit;
  font-family: inherit;
  background: white;
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-ghost);
}

/* ── File input label ──────────────────────── */
.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--slate-100);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-input-label:hover {
  background: var(--slate-150);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   Dashboard — Modern Layout
   ============================================ */

/* ── Status Distribution Bar ─────────────── */
.dash-status-card {
  padding: 1.25rem 1.5rem;
}

.status-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--slate-100);
  gap: 2px;
}

.status-bar-segment {
  transition: width var(--duration-slow) var(--ease-out);
  min-width: 4px;
  border-radius: 1px;
}

.status-bar-segment:first-child {
  border-radius: var(--radius-full) 1px 1px var(--radius-full);
}

.status-bar-segment:last-child {
  border-radius: 1px var(--radius-full) var(--radius-full) 1px;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.25rem;
  margin-top: 0.75rem;
}

.status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.status-legend-item b {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-color-new { background: var(--info); }
.status-color-on_order { background: #f97316; }
.status-color-confirmed { background: var(--primary); }
.status-color-picking { background: var(--warning); }
.status-color-partially_shipped { background: #b45309; }
.status-color-shipped { background: var(--success); }
.status-color-closed { background: var(--slate-400); }
.status-color-cancelled { background: var(--danger); }
.status-color-default { background: var(--slate-300); }
.status-color-empty { background: var(--slate-200); }

/* ── Quick Actions ────────────────────────── */
/* ── Dashboard Data Grid ──────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.dash-grid-orders   { grid-column: 1 / -1; grid-row: 1; }
.dash-grid-lowstock { grid-column: 1; grid-row: 2; }
.dash-grid-certs    { grid-column: 2; grid-row: 2; }

@media (max-width: 1200px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .dash-grid-orders,
  .dash-grid-lowstock,
  .dash-grid-certs {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ── Activity Timeline ────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 420px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item:hover {
  background: var(--slate-25);
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px var(--bg-card);
}

.timeline-dot-positive {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}

.timeline-dot-negative {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

.timeline-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-article {
  font-size: var(--font-size-xs);
  color: var(--text);
  font-weight: 500;
}

.timeline-qty {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text);
}

.timeline-time {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
  margin-left: auto;
}

.timeline-empty {
  padding: 2rem;
}

/* ── Page header actions ──────────────────── */
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   Global UI Enhancements
   ============================================ */

/* ── Filter size utilities ───────────────── */
.filter-search  { width: 220px; max-width: 100%; flex: 0 1 220px; min-width: 120px; }
.filter-narrow  { width: 90px;  max-width: 100%; }
.filter-medium  { width: 140px; max-width: 100%; }
.filter-wide    { width: 200px; max-width: 100%; }

.payments-filters-row {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 0.625rem;
  padding-bottom: 0;
}

.payments-filters-row > * {
  flex: 0 1 auto;
  min-width: 0;
}

.payments-client-picker {
  width: 220px;
  min-width: 180px;
  max-width: 240px;
}

.payments-filters-row .filter-medium {
  width: 135px;
  min-width: 135px;
}

.payments-filters-row #payments-limit-filter {
  width: 145px;
  min-width: 145px;
}

.payments-client-picker .entity-picker-selected {
  display: none;
}

.warehouse-filters-row {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 0.625rem;
  padding-bottom: 0;
}

.warehouse-filters-row > * {
  flex: 0 1 auto;
  min-width: 0;
}

.warehouse-filters-row .warehouse-wh-filter {
  width: 220px;
  min-width: 180px;
}

.warehouse-filters-row .warehouse-group-filter {
  width: 180px;
  min-width: 160px;
}

.warehouse-filters-row .warehouse-type-filter {
  width: 130px;
  min-width: 120px;
}

.warehouse-filters-row .warehouse-search-filter {
  width: 220px;
  min-width: 180px;
  max-width: 100%;
}

.warehouse-filters-row #warehouse-limit-filter {
  width: 145px;
  min-width: 145px;
}

/* Suppliers page: keep "на странице" selector visible in one row */
.page-filters input.filter-search-suppliers {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .page-filters {
    padding: 0.65rem 0.7rem;
    gap: 0.5rem;
  }

  .filters-admin-row:not(.filters-admin-row-nowrap) {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-admin-row:not(.filters-admin-row-nowrap) > * {
    width: 100%;
    flex: 1 1 auto;
  }

  .filter-fixed-130,
  .filter-fixed-140,
  .filter-fixed-160,
  .filter-flex-1,
  .filter-flex-2 {
    width: 100%;
    flex: 1 1 auto;
  }

  .filters-admin-row-nowrap > * {
    flex: 0 0 auto;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state p {
    max-width: none;
  }

  .card {
    padding: 1rem;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
}

@media (max-width: 640px) {
  .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card > .data-table,
  .card > .table-wrapper,
  .card table.data-table {
    min-width: 640px;
  }
}

@media (max-width: 768px) {
  .page-filters input.filter-search-suppliers {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }

  .payments-filters-row {
    gap: 0.5rem;
  }

  .payments-client-picker {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .payments-filters-row .filter-medium,
  .payments-filters-row #payments-limit-filter {
    width: 100%;
    min-width: 0;
  }

  .warehouse-filters-row {
    gap: 0.5rem;
  }

  .warehouse-filters-row .warehouse-wh-filter,
  .warehouse-filters-row .warehouse-group-filter,
  .warehouse-filters-row .warehouse-type-filter,
  .warehouse-filters-row .warehouse-search-filter,
  .warehouse-filters-row #warehouse-limit-filter {
    width: 100%;
    min-width: 0;
  }
}

/* ── Enhanced page-filters bar ───────────── */
.page-filters {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow-xs);
}

.filter-field-compact {
  margin-bottom: 0;
}

.filter-apply-btn {
  align-self: flex-end;
}

.production-costs-filter-bar {
  align-items: flex-end;
  gap: 0.625rem;
}

.production-costs-toggle-field {
  flex: 0 0 128px;
}

.form-group label.production-costs-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 38px;
  margin-bottom: 0;
  font-family: var(--font);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.form-group label.production-costs-toggle input {
  appearance: auto;
  -webkit-appearance: auto;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
}

.filters-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filters-admin-row-nowrap {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.filters-admin-row > * {
  min-width: 0;
}

.filter-flex-1 {
  flex: 1 1 160px;
}

.filter-flex-2 {
  flex: 2 1 260px;
}

.filter-fixed-130 {
  flex: 0 0 130px;
}

.filter-fixed-140 {
  flex: 0 0 140px;
}

.filter-fixed-160 {
  flex: 0 0 160px;
}

.filter-equal {
  flex: 1 1 0;
  width: 0;
}

.inline-check-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  color: var(--text-secondary);
}

/* ── Page subtitle ───────────────────────── */
.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* ── Enhanced empty state ────────────────── */
.empty-state svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

/* ── Loading skeleton shimmer ────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--slate-100) 25%,
    var(--slate-50) 50%,
    var(--slate-100) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 0.5rem;
  width: 60%;
}

.skeleton-card {
  height: 120px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Photo gallery (sku-detail) ──────────── */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.photo-grid-item {
  position: relative;
}

.photo-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition-fast);
  cursor: pointer;
}

.photo-thumb:hover {
  box-shadow: var(--shadow-md);
}

.photo-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: var(--radius-full);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.photo-grid-item:hover .photo-delete-btn {
  opacity: 1;
}

/* ── Order status inline select ──────────── */
.order-status-inline {
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  min-width: 140px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.order-status-inline[class*="status-"] {
  border-color: transparent;
}

/* ── Stock input cell ────────────────────── */
.stock-input-cell {
  min-width: 140px;
}

/* ── Shipment qty input ──────────────────── */
.shipment-qty-input {
  max-width: 120px;
}

/* ── Exchange card grid layouts ──────────── */
.exchange-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.exchange-card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.exchange-card-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.exchange-log-empty {
  padding: 1rem;
}

.modal-footer-info-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.import-errors-pre {
  white-space: pre-wrap;
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 1024px) {
  .exchange-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Development form grid ───────────────── */
.dev-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group-max-140 {
  max-width: 140px;
}

.form-group-max-320 {
  max-width: 320px;
}

.form-group-actions-bottom {
  display: flex;
  align-items: flex-end;
}

.export-columns-row {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.export-col-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.btn-file-trigger {
  cursor: pointer;
}

@media (max-width: 768px) {
  .dev-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Action cell center ──────────────────── */
.action-cell {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

/* ── Payroll statement ───────────────────── */
.payroll-statement-filters {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 0.5rem;
  padding-bottom: 0.75rem;
}

.payroll-statement-filters > * {
  flex: 0 1 auto;
  min-width: 0;
}

.payroll-statement-filters #payroll-period-preset {
  width: 155px;
  min-width: 145px;
}

.payroll-statement-filters #payroll-date-from,
.payroll-statement-filters #payroll-date-to {
  width: 132px;
  min-width: 128px;
}

.payroll-statement-filters #payroll-employee-status {
  width: 150px;
  min-width: 140px;
}

.payroll-statement-filters #payroll-apply {
  flex: 0 0 auto;
}

.payroll-statement-table-wrapper {
  overflow-x: auto;
}

.payroll-statement-table th,
.payroll-statement-table td {
  white-space: nowrap;
}

.payroll-statement-table tfoot th {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.payroll-employee-col {
  min-width: 96px;
  max-width: 128px;
}

.payroll-payable-cell {
  color: var(--text);
}

.payroll-print-heading {
  display: none;
}

#payroll-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

/* ── Price list ────────────────────────────── */
.price-list-filters {
  flex-wrap: nowrap;
  overflow: visible;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}

.price-list-filters > * {
  flex: 0 1 auto;
  min-width: 0;
}

.price-list-filters #price-list-type,
.price-list-filters #price-list-client,
.price-list-filters #price-list-search {
  width: 150px;
  min-width: 0;
}

.price-list-filters #price-list-client {
  width: 160px;
}

.price-list-filters #price-list-search {
  width: 120px;
}

.price-list-client-search-wrap {
  position: relative;
  width: 180px;
  min-width: 0;
}

.price-list-client-search-wrap #price-list-client-search {
  width: 100%;
}

.price-list-client-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.price-list-client-result,
.price-list-client-result-empty {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--font-size-sm);
  text-align: left;
}

.price-list-client-result {
  cursor: pointer;
}

.price-list-client-result:hover,
.price-list-client-result.is-active {
  background: var(--primary-50);
}

.price-list-client-result-empty {
  color: var(--text-muted);
  cursor: default;
}

.price-list-filters .filter-checkbox {
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 0.25rem;
  padding-left: 0;
  padding-right: 0;
}

.price-list-filters #price-list-apply {
  flex: 0 0 auto;
}

#price-list-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.price-list-print-heading {
  display: none;
}

.price-list-table-wrapper {
  overflow-x: auto;
}

.price-list-table th,
.price-list-table td {
  white-space: nowrap;
}

.price-list-number {
  width: 56px;
}

.price-list-price {
  width: 160px;
}

@media (max-width: 640px) {
  .payroll-statement-filters #payroll-period-preset,
  .payroll-statement-filters #payroll-date-from,
  .payroll-statement-filters #payroll-date-to,
  .payroll-statement-filters #payroll-employee-status,
  .payroll-statement-filters #payroll-apply,
  .price-list-filters #price-list-type,
  .price-list-filters #price-list-client,
  .price-list-filters #price-list-search,
  .price-list-client-search-wrap,
  .price-list-filters #price-list-apply {
    width: 100%;
    min-width: 0;
  }

  .price-list-filters {
    flex-wrap: wrap;
  }
}

@media print {
  body.payroll-printing * {
    visibility: hidden;
  }

  body.price-list-printing * {
    visibility: hidden;
  }

  body.payroll-printing #payroll-print-area,
  body.payroll-printing #payroll-print-area * {
    visibility: visible;
  }

  body.price-list-printing #price-list-print-area,
  body.price-list-printing #price-list-print-area * {
    visibility: visible;
  }

  body.payroll-printing #payroll-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
  }

  body.price-list-printing #price-list-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
  }

  body.payroll-printing .payroll-print-heading {
    display: block;
    margin-bottom: 16px;
  }

  body.price-list-printing .price-list-print-heading {
    display: block;
    margin-bottom: 16px;
  }

  body.payroll-printing .payroll-statement-table-wrapper {
    overflow: visible;
  }

  body.price-list-printing .price-list-table-wrapper {
    overflow: visible;
  }

  body.payroll-printing .payroll-statement-table {
    width: 100%;
    font-size: 10px;
  }

  body.price-list-printing .price-list-table {
    width: 100%;
    font-size: 12px;
  }
}

/* ── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
