@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/outfit/outfit-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/outfit/outfit-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/outfit/outfit-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/outfit/outfit-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/outfit/outfit-800.ttf') format('truetype');
}

:root {
  --brand: #FB8C9C;
  --brand-hover: #fa7588;
  --navy: #152836;
  --navy-light: #1e3a4f;
  --ink: #1a202c;
  --muted: #718096;
  --line: #e2e8f0;
  --surface: #ffffff;
  --page: #f4f7f9;
  --shadow-sm: 0 2px 8px rgba(21, 40, 54, 0.04);
  --shadow-md: 0 8px 24px rgba(21, 40, 54, 0.08);
  --shadow-lg: 0 16px 40px rgba(21, 40, 54, 0.12);
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.mobile-app-bar, .mobile-menu-overlay { display: none; }
.sidebar { background: var(--navy); color: #fff; display: flex; flex-direction: column; height: 100vh; padding: 22px; position: sticky; top: 0; }
.brand { color: var(--surface); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 28px; }
.brand span { color: var(--brand); }
.nav-link { border-radius: var(--radius-md); color: rgba(255, 255, 255, 0.82); font-weight: 500; margin-bottom: 2px; padding: 10px 16px; transition: all .25s ease; }
.nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateX(4px); }
.nav-link:focus, .nav-link:active { background: var(--brand); color: #fff; }
.nav-section { color: rgba(255, 255, 255, 0.42); font-size: .75rem; font-weight: 700; letter-spacing: 1px; margin: 18px 0 8px; text-transform: uppercase; }
.nav-sub { font-size: .95rem; padding-left: 28px; }
.sidebar-user { border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.72); margin-top: auto; padding-top: 20px; }
.sidebar-user div { color: #fff; font-weight: 600; }
.sidebar-user a { color: var(--brand); display: inline-block; font-weight: 500; margin-top: 8px; text-decoration: none; transition: color .2s ease; }
.sidebar-user a:hover { color: var(--brand-hover); }
.content { display: flex; flex-direction: column; min-height: 100vh; padding: 40px; }
.page-title { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 32px; }
.page-title h1 { color: var(--navy); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; margin: 0; }
.page-title p { color: var(--muted); font-size: 1.05rem; margin: 6px 0 0; }
.quick-actions, .filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-bar { background: var(--surface); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 24px; padding: 20px; }
.filter-bar .form-control { min-width: 260px; }
.filter-bar .form-control, .filter-bar .form-select { border-color: var(--line); border-radius: var(--radius-md); padding: 10px 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.filter-bar .form-control:focus, .filter-bar .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(251, 140, 156, .2); }
.metric-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 32px; }
.metric, .panel, .login-card { background: var(--surface); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); transition: transform .3s ease, box-shadow .3s ease; }
.metric { overflow: hidden; padding: 24px; position: relative; }
.metric::after { background: var(--navy-light); border-radius: 4px 0 0 4px; content: ""; height: 100%; left: 0; position: absolute; top: 0; width: 4px; }
.metric-link { color: inherit; display: block; text-decoration: none; }
.metric-link:hover { box-shadow: var(--shadow-lg); color: inherit; transform: translateY(-4px); }
.metric span { color: var(--muted); display: block; font-size: .9rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.metric strong { color: var(--navy); display: block; font-size: 2.5rem; font-weight: 800; line-height: 1; margin-top: 12px; }
.metric.warning::after { background: var(--brand); }
.metric.warning strong { color: var(--brand); }
.panel { padding: 24px; }
.panel h2 { color: var(--navy); font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.btn { border-radius: var(--radius-md); font-weight: 600; padding: 10px 20px; transition: all .2s ease; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); box-shadow: 0 6px 16px rgba(251, 140, 156, .3); transform: translateY(-2px); }
.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(240px, 1fr)); }
.form-grid.single { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }
.form-label { color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.form-control, .form-select { background-color: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 16px; transition: all .2s ease; }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(251, 140, 156, .15); }
.stock-tabs { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding: 6px; width: fit-content; }
.stock-tab-button { background: transparent; border: 0; border-radius: 8px; color: var(--muted); font-weight: 700; padding: 10px 16px; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.stock-tab-button:hover { background: #f8fafc; color: var(--navy); }
.stock-tab-button.is-active { background: var(--navy); box-shadow: var(--shadow-sm); color: #fff; }
.conformity-fields { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; }
.conformity-fields h2 { font-size: 1.1rem; margin-bottom: 4px; }
.conformity-fields p { color: var(--muted); margin: 0 0 16px; }
.journal-filter { border-top: 1px solid var(--line); margin: 18px 0 22px; padding-top: 18px; }
.journal-document-filter { align-self: end; padding-bottom: 12px; }
.journal-filter-actions { align-items: end; display: flex; gap: 10px; }
.inventory-status-strip, .inventory-summary-grid { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(140px, 1fr)); margin-bottom: 18px; }
.inventory-status-strip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; }
.inventory-status-strip div, .inventory-summary-grid div { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; }
.inventory-status-strip span, .inventory-summary-grid span { color: var(--muted); display: block; font-size: .78rem; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.inventory-status-strip strong, .inventory-summary-grid strong { color: var(--navy); display: block; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.inventory-summary-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.inventory-count-location { align-items: end; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); display: grid; gap: 14px; grid-template-columns: minmax(240px, .7fr) minmax(220px, 1fr); padding: 14px; }
.inventory-count-location p { color: var(--muted); font-weight: 600; line-height: 1.35; margin: 0 0 3px; }
.inventory-table-block { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.inventory-table-block h3 { color: var(--navy); font-size: 1.1rem; font-weight: 800; margin: 0 0 14px; }
.inventory-table-hint { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--muted); font-weight: 600; margin: 0 0 14px; padding: 10px 12px; }
.inventory-create-article-link { color: var(--brand); display: inline-block; font-weight: 800; margin-top: 8px; text-decoration: none; }
.inventory-create-article-link:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }
.orders-auto-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.orders-auto-grid fieldset { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); margin: 0; padding: 18px; }
.orders-auto-grid legend { color: var(--navy); float: none; font-size: 1rem; font-weight: 800; margin-bottom: 14px; width: auto; }
.orders-auto-grid .form-check { display: flex; gap: 10px; margin-bottom: 10px; min-height: 0; padding-left: 0; }
.orders-auto-grid .form-check-input { flex: 0 0 auto; margin-left: 0; margin-top: 3px; }
.orders-frequency-row { align-items: center; display: grid; gap: 10px; grid-template-columns: auto 80px minmax(120px, 160px); }
.about-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
.about-panel { margin-bottom: 24px; }
.about-panel p { color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.about-facts { display: grid; gap: 10px; margin: 0; }
.about-facts div { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); display: grid; gap: 12px; grid-template-columns: 140px minmax(0, 1fr); padding: 12px 14px; }
.about-facts dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.about-facts dd { color: var(--navy); font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.about-list { color: var(--muted); line-height: 1.55; margin: 0; padding-left: 20px; }
.about-list li + li { margin-top: 8px; }
.about-library-table { margin-bottom: 0; }
.about-library-table a { overflow-wrap: anywhere; }
.order-lines-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.order-lines-table .form-control { min-width: 90px; padding: 8px 10px; }
.order-line-quantity { max-width: 110px; }
.bulk-scan-row { display: grid; gap: 8px; grid-template-columns: minmax(180px, 1fr) 90px auto auto; }
.bulk-quantity-input { text-align: right; }
.bulk-lines-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.bulk-lines-table { margin-bottom: 0; }
.bulk-lines-table th, .bulk-lines-table td { padding: 10px 12px; }
.bulk-lines-table .bulk-line-quantity { min-width: 86px; text-align: right; }
.login-body { align-items: center; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); display: flex; justify-content: center; min-height: 100vh; padding: 20px; }
.login-page { align-items: center; display: flex; flex-direction: column; gap: 26px; width: 100%; }
.login-card { box-shadow: 0 20px 50px rgba(0, 0, 0, .3); max-width: 460px; padding: 40px; width: 100%; }
.login-card h1 { color: var(--navy); font-size: 2rem; font-weight: 800; margin-bottom: 24px; text-align: center; }
.login-card h1 span { color: var(--brand); }
.shop-preview img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); max-height: 180px; max-width: 240px; object-fit: contain; padding: 8px; }
.article-form-layout { align-items: start; display: grid; gap: 26px; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); }
.article-form-layout-single { grid-template-columns: minmax(0, 1fr); }
.article-form-main { min-width: 0; }
.article-form-side { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 18px; padding: 18px; position: sticky; top: 24px; }
.article-form-side h2 { color: var(--navy); font-size: 1.1rem; font-weight: 800; margin: 0 0 4px; }
.article-form-side p { color: var(--muted); font-size: .9rem; margin: 0; }
.article-form-side textarea { min-height: 150px; resize: vertical; }
.article-product-description textarea { min-height: 240px; }
.label-print-panel { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; }
.label-print-head { align-items: center; display: flex; gap: 14px; justify-content: space-between; margin-bottom: 14px; }
.label-print-head h2 { color: var(--navy); font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; }
.label-print-head p { color: var(--muted); font-size: .9rem; margin: 0; }
.label-print-options { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 14px; }
.label-print-options .form-check { align-items: center; display: flex; gap: 8px; margin: 0; min-height: 0; }
.label-preview { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; gap: 16px; padding: 14px; }
.label-preview-qr { align-items: center; display: flex; flex: 0 0 104px; height: 104px; justify-content: center; width: 104px; }
.label-preview-qr canvas, .label-preview-qr img { height: 96px !important; width: 96px !important; }
.label-preview-text { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.label-preview-text strong { color: var(--navy); font-size: 1rem; overflow-wrap: anywhere; }
.label-preview-text span { color: var(--ink); font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.label-preview-text small { color: var(--muted); font-size: .78rem; margin-top: 4px; overflow-wrap: anywhere; }
.article-number-image { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; justify-content: center; margin-top: 12px; min-height: 250px; padding: 16px; }
.article-number-image img { max-height: 270px; max-width: 100%; object-fit: contain; width: 100%; }
.article-image-upload { cursor: pointer; position: relative; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.article-image-upload:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.article-product-image { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; justify-content: center; min-height: 260px; padding: 16px; }
.article-product-image img { max-height: 280px; max-width: 100%; object-fit: contain; width: 100%; }
.article-product-placeholder { align-items: center; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); display: flex; flex-direction: column; gap: 6px; min-height: 220px; justify-content: center; padding: 18px; text-align: center; width: 100%; }
.article-product-placeholder span, .article-product-placeholder small { display: block; width: 100%; }
.article-product-placeholder small { color: var(--brand); font-weight: 700; }
.article-variant-list { display: flex; flex-direction: column; gap: 8px; }
.article-variant-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.article-variant-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); color: inherit; transform: translateY(-1px); }
.article-variant-item.is-current { border-color: #198754; box-shadow: inset 3px 0 0 #198754; }
.article-variant-item strong { color: var(--navy); display: block; line-height: 1.25; }
.article-variant-item span { color: var(--muted); display: block; font-size: .82rem; }
.article-variant-meta { text-align: right; white-space: nowrap; }
.article-variant-current { color: #198754 !important; font-weight: 800; }
.article-safety-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; }
.article-safety-box h3 { color: var(--navy); font-size: 1rem; font-weight: 800; margin: 0 0 12px; }
.article-safety-list { display: grid; gap: 8px; margin: 0 0 12px; }
.article-safety-list div { display: grid; gap: 10px; grid-template-columns: minmax(128px, .42fr) minmax(0, 1fr); }
.article-safety-list dt { color: var(--muted); font-size: .7rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; text-transform: uppercase; }
.article-safety-list dd { margin: 0; }
.article-document-list { display: flex; flex-direction: column; gap: 8px; }
.article-document-link { align-items: center; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--navy); display: flex; font-weight: 700; justify-content: space-between; padding: 9px 11px; text-decoration: none; }
.article-document-link:hover { border-color: var(--brand); color: var(--brand); }
.article-document-link span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.article-form-barcode .ean-helper-row { flex-wrap: wrap; }
.article-form-barcode .ean-helper-row .form-control { flex: 1 1 150px; }
.article-form-barcode .code-preview { grid-template-columns: 1fr; }
.article-form-barcode .code-preview-box { min-height: 108px; }
.article-form-barcode .qr-code-image { min-height: 96px; }
.article-form-barcode .qr-code-image canvas, .article-form-barcode .qr-code-image img { height: 96px; width: 96px; }
.gs1-info-panel { background: #eef8f3; border: 1px solid #b9dfcd; border-radius: var(--radius-md); color: #123326; margin-top: 10px; padding: 12px; }
.gs1-info-title { font-size: .78rem; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.gs1-info-panel dl { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.gs1-info-panel div { min-width: 0; }
.gs1-info-panel dt { color: #4d725f; font-size: .72rem; font-weight: 800; margin: 0; }
.gs1-info-panel dd { font-size: .95rem; font-weight: 800; margin: 2px 0 0; overflow-wrap: anywhere; }
.code-preview { align-items: stretch; display: grid; gap: 10px; grid-template-columns: minmax(220px, 1fr) 140px; margin-top: 10px; }
.code-preview-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); min-height: 138px; padding: 10px; }
.code-preview-label { color: var(--muted); font-size: .72rem; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.code-preview svg { display: block; max-width: 100%; }
.qr-code-image { align-items: center; display: flex; justify-content: center; min-height: 116px; }
.qr-code-image canvas, .qr-code-image img { height: 116px; width: 116px; }
.code-preview-hint { color: var(--muted); grid-column: 1 / -1; line-height: 1.35; }
.barcode-field-hint { display: block; font-size: .88rem; font-weight: 800; margin: 7px 0 2px; min-height: 1.2em; }
.barcode-field-hint.text-danger { color: #b42318 !important; }
.barcode-field-hint.text-success { color: #137333 !important; }
.barcode-field-hint.text-muted { color: var(--muted) !important; font-weight: 700; }
.article-cell { align-items: center; display: flex; gap: 12px; }
.article-thumb { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); height: 56px; object-fit: contain; padding: 4px; transition: transform .2s ease, box-shadow .2s ease; width: 56px; }
.article-row:hover .article-thumb { box-shadow: var(--shadow-md); transform: scale(1.08); }
.article-thumb-placeholder { align-items: center; background: #f1f5f9; border: 1px dashed var(--muted); border-radius: var(--radius-md); color: var(--muted); display: flex; font-size: .8rem; height: 56px; justify-content: center; width: 56px; }
.articles-filter { align-items: end; display: grid; grid-template-columns: minmax(280px, 1.25fr) minmax(300px, 1fr) minmax(230px, .8fr) auto; }
.shop-catalog-filter { align-items: end; display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(300px, .9fr) auto; }
.shop-category-field .form-control { min-width: 0; }
.shop-category-field #shopCategoryInput { display: none; }
.shop-category-field .category-picker { min-width: 0; width: 100%; }
.shop-category-field .category-picker > summary { min-height: 46px; padding: 10px 14px; }
.shop-category-active { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shop-category-chip { background: #eef8f3; border: 1px solid #b9dfcd; border-radius: 999px; color: #123326; display: inline-flex; font-size: .82rem; font-weight: 800; line-height: 1.2; max-width: 100%; padding: 6px 10px; }
.shop-category-reset { color: var(--muted); font-size: .84rem; font-weight: 700; text-decoration: none; }
.shop-category-reset:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.filter-field { min-width: 0; }
.filter-field .form-label { color: var(--muted); font-size: .78rem; font-weight: 800; margin-bottom: 5px; text-transform: uppercase; }
.filter-field-search .form-control { min-width: 0; }
.filter-actions { display: flex; gap: 8px; white-space: nowrap; }
.category-picker { min-width: 0; position: relative; width: 100%; }
.category-picker > summary { align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; display: flex; justify-content: space-between; min-height: 38px; padding: 6px 12px; }
.category-picker > summary::-webkit-details-marker { display: none; }
.category-picker > summary::after { color: #344054; content: "v"; font-size: .8rem; margin-left: 14px; }
.category-picker[open] > summary { border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.category-picker-summary-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-picker-badge { background: #eef6ff; border: 1px solid #cfe1ff; border-radius: 999px; color: #2457a6; flex: 0 0 auto; font-size: .72rem; font-weight: 800; margin-right: 18px; padding: 4px 8px; }
.category-picker-menu { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); left: 0; margin-top: 4px; max-height: 520px; min-width: 440px; overflow: auto; padding: 8px; position: absolute; top: 100%; z-index: 2500; }
.shop-category-picker .category-picker-menu { max-height: min(58vh, 460px); min-width: min(520px, calc(100vw - 72px)); padding: 10px; }
.category-picker-search { background: #fff; border-bottom: 1px solid var(--line); margin: -2px -2px 8px; padding: 2px 2px 10px; position: sticky; top: -10px; z-index: 2; }
.category-picker-search .form-control { min-width: 0; }
.category-picker-list { list-style: none; margin: 0; padding-left: 18px; }
.category-picker-menu > .category-picker-list { padding-left: 0; }
.category-picker-node > summary { align-items: center; display: flex; gap: 4px; list-style: none; }
.category-picker-node > summary::-webkit-details-marker { display: none; }
.category-picker-node > summary::before { color: #667085; content: ">"; display: inline-block; font-size: .75rem; width: 13px; }
.category-picker-node[open] > summary::before { content: "v"; }
.category-picker-link { border-radius: 4px; color: #101828; display: block; flex: 1 1 auto; padding: 4px 7px; text-decoration: none; }
.category-picker-link:hover, .category-picker-link.is-active { background: #f8fafc; color: var(--brand); }
.category-picker-label { color: #475467; cursor: default; font-weight: 600; }
.category-picker-label:hover { background: transparent; color: #475467; }
.shop-category-picker .category-picker-link { padding: 6px 8px; }
.shop-category-picker .category-picker-list { padding-left: 14px; }
.shop-category-picker .category-picker-node.is-hidden, .shop-category-picker li.is-hidden { display: none; }
.articles-panel { padding: 0; overflow: hidden; }
.panel-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 20px 24px; }
.panel-toolbar h2 { color: var(--navy); font-size: 1.25rem; font-weight: 700; margin: 0; }
.panel-toolbar p { color: var(--muted); margin: 3px 0 0; }
.panel-toolbar.compact { border-bottom: 0; padding: 0; }
.master-data-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.master-data-card { background: var(--surface); border: 0; border-radius: var(--radius-lg); border-top: 4px solid transparent; box-shadow: var(--shadow-sm); color: var(--ink); display: flex; flex-direction: column; gap: 10px; min-height: 130px; padding: 24px; text-decoration: none; transition: all .3s ease; }
.master-data-card:hover { border-top-color: var(--brand); box-shadow: var(--shadow-md); color: var(--ink); transform: translateY(-4px); }
.master-data-card strong { color: var(--navy); font-size: 1.2rem; font-weight: 700; }
.master-data-card span { color: var(--muted); line-height: 1.45; }
.practice-profile-form { display: flex; flex-direction: column; gap: 10px; }
.profile-section { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.profile-section > summary { background: var(--navy); color: #fff; cursor: pointer; font-weight: 700; list-style: none; padding: 10px 14px; }
.profile-section > summary::-webkit-details-marker { display: none; }
.profile-section > summary::after { content: "v"; float: right; }
.profile-section[open] > summary::after { content: "^"; }
.profile-grid { background: #fff; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(220px, 1fr)); padding: 16px; }
.profile-inline { display: grid; gap: 10px; grid-template-columns: 110px 1fr; }
.profile-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.category-tree-panel { padding: 16px 20px 20px; }
.category-tree { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); max-width: 820px; padding: 8px; }
.category-tree-list { list-style: none; margin: 0; padding-left: 18px; }
.category-tree > .category-tree-list { padding-left: 0; }
.category-tree-item { margin: 1px 0; }
.category-node > summary, .category-leaf { align-items: center; border-radius: 4px; display: flex; gap: 8px; min-height: 30px; padding: 3px 6px; }
.category-node > summary { cursor: pointer; list-style: none; }
.category-node > summary::-webkit-details-marker { display: none; }
.category-node > summary::before { color: #667085; content: ">"; display: inline-block; font-size: .78rem; width: 14px; }
.category-node[open] > summary::before { content: "v"; }
.category-leaf::before { color: #98a2b3; content: "-"; display: inline-block; font-size: .72rem; width: 14px; }
.category-node > summary:hover, .category-leaf:hover { background: #f8fafc; }
.category-name { color: #101828; flex: 1 1 auto; font-weight: 600; min-width: 0; }
.category-actions { align-items: center; display: none; flex: 0 0 auto; gap: 6px; }
.category-actions form { margin: 0; }
.category-node > summary:hover .category-actions, .category-leaf:hover .category-actions { display: flex; }
.articles-table { margin-bottom: 0; width: 100%; }
.articles-table thead th { background: transparent; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .5px; padding: 16px 14px; text-transform: uppercase; white-space: nowrap; }
.articles-table tbody td { border-bottom: 1px solid var(--line); padding: 16px 14px; transition: background .2s ease; vertical-align: middle; }
.articles-table tbody tr:hover td { background: #f8fafc; }
.article-row { cursor: pointer; }
.table-sort-link { color: var(--muted); display: inline-flex; font-weight: 700; text-decoration: none; }
.table-sort-link:hover { color: var(--brand); text-decoration: underline; }
.article-number { color: #344054; font-weight: 700; white-space: nowrap; }
.article-image-col { width: 72px; }
.article-main { display: flex; flex-direction: column; gap: 3px; min-width: 280px; }
.article-main strong { color: #101828; line-height: 1.25; }
.article-main small, .article-meta { color: var(--muted); }
.stock-value { color: #101828; font-weight: 700; white-space: nowrap; }
.stock-minimum { color: #475467; font-weight: 700; }
.article-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 190px; }
.article-actions form { margin: 0; }
.dashboard-link-row { cursor: pointer; }
.dashboard-link-row:hover > * { filter: brightness(.98); text-decoration: underline; text-underline-offset: 3px; }
.inventory-target-row > * { box-shadow: inset 0 0 0 999px rgba(251, 140, 156, .08); }
.inventory-article-row { cursor: pointer; }
.inventory-article-row:hover > * { background: #f8fafc; }
.inventory-article-link { color: #101828; text-decoration: none; }
.inventory-article-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.shop-image-hover { display: inline-flex; position: relative; }
.shop-image-preview { background: #fff; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; left: 64px; padding: 12px; position: fixed; top: 0; z-index: 3000; }
.shop-image-preview img { display: block; max-height: 320px; max-width: 320px; object-fit: contain; }
.shop-image-preview.is-visible { display: block; }
.shop-image-preview-detail { border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; margin-top: 10px; max-width: 320px; padding-top: 10px; }
.shop-image-preview-detail strong { color: var(--navy); line-height: 1.25; }
.shop-image-preview-detail span { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.shop-image-preview-detail em { color: #101828; font-style: normal; font-weight: 600; }
.shop-catalog-table td { vertical-align: middle; }
.shop-row { cursor: context-menu; }
.shop-row:focus, .shop-row:hover { background: #f8fafc; outline: none; }
.shop-context-menu { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); display: none; min-width: 250px; padding: 8px 0; position: fixed; z-index: 2000; }
.shop-context-menu button { background: transparent; border: 0; color: var(--ink); display: block; font-size: .95rem; font-weight: 500; padding: 10px 16px; text-align: left; transition: background .2s ease, color .2s ease; width: 100%; }
.shop-context-menu button:hover { background: #f8fafc; color: var(--brand); }
.shop-context-menu button:disabled { color: #98a2b3; cursor: not-allowed; }
.shop-context-menu button:disabled:hover { background: transparent; }
.shop-detail-modal .modal-body { background: #f8fafc; padding: 8px; }
.shop-detail-shell { background: #fff; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); min-height: 470px; padding: 32px; }
.shop-detail-head { display: flex; gap: 20px; justify-content: space-between; }
.shop-detail-head h2 { color: var(--navy); font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; text-transform: uppercase; }
.shop-detail-variant { color: var(--brand); font-weight: 700; margin-bottom: 4px; }
.shop-detail-variants { margin-bottom: 8px; max-width: 360px; }
.shop-detail-price { min-width: 150px; text-align: right; }
.shop-detail-price strong { color: var(--navy); font-size: 1.5rem; }
.shop-detail-price small { display: block; font-size: .74rem; font-weight: 600; margin-top: 20px; }
.shop-detail-grid { display: grid; gap: 24px; grid-template-columns: 190px 1fr; margin-top: 10px; }
.shop-detail-media { align-items: center; border-right: 1px solid #d6d6d6; display: flex; flex-direction: column; gap: 12px; justify-content: center; min-height: 285px; padding-right: 22px; }
.shop-detail-media img { max-height: 170px; max-width: 150px; object-fit: contain; }
.shop-detail-media small { font-size: .72rem; }
.shop-no-image { align-items: center; background: #f7f9fb; border: 1px dashed var(--line); color: var(--muted); display: flex; font-size: .85rem; height: 140px; justify-content: center; padding: 12px; text-align: center; width: 150px; }
.shop-detail-description { max-height: 330px; overflow: auto; padding: 18px 10px 18px 0; white-space: pre-line; }
.shop-detail-description h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.shop-cart-dummy { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.shop-cart-dummy input { max-width: 210px; text-align: right; }
.shop-import-form { display: grid; gap: 6px; grid-template-columns: minmax(150px, 1.4fr) minmax(90px, .8fr) 70px 70px auto; min-width: 520px; }
.shop-import-form .btn { white-space: nowrap; }
.ean-helper-row { align-items: stretch; display: flex; gap: 8px; }
.ean-helper-row .form-control { min-width: 0; }
.ean-helper-row .btn { align-items: center; display: inline-flex; flex-shrink: 0; justify-content: center; white-space: nowrap; }
.barcode-scanner { background: #101828; border: 2px solid #3b82f6; border-radius: var(--radius-md); box-shadow: 0 4px 24px rgba(59,130,246,0.15); margin-top: 8px; max-width: 420px; overflow: hidden; position: relative; }
.barcode-scanner-video-wrap { background: #101828; position: relative; }
.barcode-scanner video { aspect-ratio: 4 / 3; display: block; height: auto; max-height: 300px; object-fit: cover; width: 100%; }
.barcode-scan-frame { border: 2.5px solid #ef4444; border-radius: 7px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .38); height: 38%; left: 14%; position: absolute; top: 31%; width: 72%; animation: inv-scan-pulse 2s ease-in-out infinite; }
.barcode-scan-frame::after { background: rgba(239, 68, 68, .75); content: ""; height: 2px; left: 0; position: absolute; right: 0; top: 50%; animation: inv-scan-line 1.8s linear infinite; }
@keyframes inv-scan-pulse { 0%, 100% { border-color: #ef4444; } 50% { border-color: #22c55e; } }
@keyframes inv-scan-line { 0% { top: 10%; opacity: 0.8; } 50% { opacity: 1; } 100% { top: 90%; opacity: 0.8; } }
.barcode-scanner-footer { align-items: center; background: rgba(0,0,0,0.55); display: flex; gap: 8px; justify-content: space-between; padding: 7px 10px; }
.barcode-scanner-footer span { color: #fff; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.barcode-scanner-torch-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); border-radius: 6px; color: #fff; cursor: pointer; display: none; font-size: 0.8rem; padding: 3px 10px; }
.barcode-scanner-torch-btn.torch-on { background: rgba(250,204,21,0.75); border-color: #fbbf24; color: #000; }
.help-panel { max-width: 980px; }
.help-panel h1 { color: var(--navy); font-size: 1.65rem; font-weight: 800; margin: 0 0 18px; }
.help-panel h2 { border-top: 1px solid var(--line); color: var(--navy); font-size: 1.18rem; font-weight: 800; margin: 30px 0 12px; padding-top: 22px; }
.help-panel h3 { color: #101828; font-size: 1rem; font-weight: 800; margin: 22px 0 10px; }
.help-panel p, .help-panel li { color: #344054; line-height: 1.62; }
.help-panel ul, .help-panel ol { margin-bottom: 16px; padding-left: 22px; }
.help-table td:first-child { color: var(--navy); font-weight: 700; width: 38%; }
.app-footer { color: #111; font-size: .86rem; margin-top: auto; padding: 34px 0 6px; }
.app-footer a { color: #111; text-decoration: none; }
.app-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-links { align-items: center; display: flex; flex-wrap: wrap; gap: 0; }
.footer-links a, .footer-links span { border-right: 1px solid #d0d0d0; line-height: 1; padding: 0 16px; }
.footer-links span:first-child { color: #111; padding-left: 0; }
.footer-links span:last-child { border-right: 0; color: var(--muted); }
.login-page .app-footer { color: rgba(255, 255, 255, .72); margin-top: 0; max-width: 760px; padding-top: 0; text-align: center; width: 100%; }
.login-page .app-footer a { color: #fff; }
.login-page .footer-links { justify-content: center; row-gap: 8px; }
.login-page .footer-links a, .login-page .footer-links span { border-color: rgba(255, 255, 255, .22); }
.login-page .footer-links span:first-child, .login-page .footer-links span:last-child { color: rgba(255, 255, 255, .72); }
.print-header { display: none; }
.article-label-sheet { align-items: flex-start; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: flex; justify-content: center; padding: 36px; }
.article-label-card { align-items: center; border: 1px solid #111; display: flex; flex-direction: column; gap: 8px; justify-content: center; min-height: 72mm; padding: 8mm; text-align: center; width: 72mm; }
.article-label-qr { align-items: center; display: flex; height: 180px; justify-content: center; width: 180px; }
.article-label-name { color: #111; font-size: 17px; font-weight: 800; line-height: 1.18; margin-top: 4px; overflow-wrap: anywhere; }
.article-label-number { color: #111; font-size: 15px; font-weight: 700; letter-spacing: .4px; }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (max-width: 900px) {
  body.mobile-menu-open { overflow: hidden; }
  .app-shell { display: block; }
  .form-grid, .article-form-layout { grid-template-columns: 1fr; }
  .mobile-app-bar { align-items: center; background: var(--navy); box-shadow: var(--shadow-md); color: #fff; display: flex; justify-content: space-between; min-height: 58px; padding: 12px 16px; position: sticky; top: 0; z-index: 3200; }
  .mobile-brand { color: #fff; font-size: 1.18rem; font-weight: 800; line-height: 1; }
  .mobile-brand span { color: var(--brand); }
  .mobile-menu-button { align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; display: inline-flex; flex-direction: column; gap: 4px; height: 40px; justify-content: center; padding: 0; width: 44px; }
  .mobile-menu-button span:not(.visually-hidden) { background: #fff; border-radius: 2px; display: block; height: 2px; width: 20px; }
  .mobile-menu-overlay { background: rgba(15, 23, 42, .48); bottom: 0; display: block; left: 0; position: fixed; right: 0; top: 0; z-index: 3000; }
  .mobile-menu-overlay[hidden] { display: none; }
  .sidebar { bottom: 0; box-shadow: 18px 0 36px rgba(15, 23, 42, .24); height: 100vh; left: 0; max-width: min(82vw, 300px); overflow-y: auto; padding: 20px; position: fixed; top: 0; transform: translateX(-105%); transition: transform .22s ease; width: 300px; z-index: 3100; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-user { margin-top: 18px; position: static; }
  .content { padding: 20px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .stock-tabs { align-items: stretch; width: 100%; }
  .stock-tab-button { flex: 1 1 0; padding: 10px 8px; }
  .inventory-status-strip, .inventory-summary-grid { grid-template-columns: 1fr; }
  .inventory-count-location { grid-template-columns: 1fr; }
  .orders-auto-grid, .orders-frequency-row { grid-template-columns: 1fr; }
  .bulk-scan-row { grid-template-columns: 1fr 84px; }
  .bulk-scan-row .btn { grid-column: span 1; padding-left: 10px; padding-right: 10px; }
  .bulk-lines-wrap { overflow-x: auto; }
  .bulk-lines-table th, .bulk-lines-table td { padding: 8px; }
  .article-form-side { position: static; }
  .label-print-head, .label-preview { align-items: flex-start; flex-direction: column; }
  .label-print-head .btn { width: 100%; }
  .page-title { align-items: flex-start; flex-direction: column; }
  .ean-helper-row { flex-direction: column; }
  .barcode-scanner { max-width: 100%; }
  .barcode-scanner video { max-height: 240px; }
  .barcode-scanner-footer { align-items: stretch; flex-direction: column; }
  .shop-catalog-filter { grid-template-columns: 1fr; }
  .shop-detail-head { flex-direction: column; }
  .shop-detail-price { text-align: left; }
  .shop-detail-grid { grid-template-columns: 1fr; }
  .shop-detail-media { border-right: 0; border-bottom: 1px solid #d6d6d6; min-height: 180px; padding: 0 0 18px; }
  .shop-cart-dummy { justify-content: stretch; }
  .shop-import-form { grid-template-columns: 1fr 1fr; min-width: 0; }
  .shop-import-form .btn { grid-column: span 2; }
  .code-preview { grid-template-columns: 1fr; }
  .articles-filter { grid-template-columns: 1fr; }
  .filter-actions { flex-wrap: wrap; }
  .filter-actions .btn { flex: 1 1 140px; }
  .category-picker { min-width: 0; width: 100%; }
  .category-picker-menu { min-width: 100%; max-width: calc(100vw - 56px); }
  .article-main { min-width: 220px; }
  .article-actions { justify-content: flex-start; min-width: 160px; }
  .master-data-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-inline { grid-template-columns: 1fr; }
  .panel-toolbar.compact { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 560px) {
  .metric-grid { grid-template-columns: 1fr; }
  .quick-actions .btn { flex: 1 1 100%; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.red { background-color: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
.status-pill.yellow { background-color: #fffbeb; color: #b54708; border: 1px solid #fec84b; }
.status-pill.green { background-color: #ecfdf3; color: #027a48; border: 1px solid #a6f4c5; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.red { background-color: #d92d20; }
.status-dot.yellow { background-color: #eaaa08; }
.status-dot.green { background-color: #12b76a; }

/* Quick stock adjustment buttons */
.qty-adjust-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-qty-adjust {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #475569;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-qty-adjust:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-qty-adjust:active:not(:disabled) {
  transform: scale(0.9);
}

.btn-qty-adjust:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background-color: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.btn-qty-adjust.btn-minus {
  color: #b42318;
  border-color: #fda29b;
}
.btn-qty-adjust.btn-minus:hover:not(:disabled) {
  background-color: #fef3f2;
  border-color: #fda29b;
}

.btn-qty-adjust.btn-plus {
  color: #027a48;
  border-color: #a6f4c5;
}
.btn-qty-adjust.btn-plus:hover:not(:disabled) {
  background-color: #ecfdf3;
  border-color: #a6f4c5;
}

.qty-value {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Flash animation for successful quick booking */
@keyframes flashSuccess {
  0% { background-color: rgba(34, 197, 94, 0.25); }
  100% { background-color: transparent; }
}

.flash-success {
  animation: flashSuccess 0.8s ease-out;
}

/* Quick tabs for storage rooms (locations) */
.room-tabs-container {
  margin: 0 0 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.room-tabs-container::-webkit-scrollbar {
  height: 4px;
}

.room-tabs {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 8px;
  padding-bottom: 4px;
}

/* Collapsible Filter Styles & Custom Buttons */
.btn-outline-navy {
  color: var(--navy);
  border-color: var(--navy);
  background-color: transparent;
  transition: all 0.2s ease;
}
.btn-outline-navy:hover, .btn-outline-navy:focus, .btn-outline-navy.active, button[aria-expanded="true"].btn-outline-navy {
  color: #fff !important;
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
}
.btn-outline-navy svg {
  transition: transform 0.2s ease;
}
button[aria-expanded="true"].btn-outline-navy svg {
  transform: rotate(180deg);
}
.collapse-status::after {
  content: "einblenden";
}
button[aria-expanded="true"] .collapse-status::after {
  content: "ausblenden" !important;
}

.room-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background-color: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}

.room-tab-btn:hover {
  background-color: rgba(251, 140, 156, 0.08);
  color: var(--brand);
  border-color: var(--brand);
}

.room-tab-btn.is-active {
  background-color: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(21, 40, 54, 0.18);
}

/* Compact button and shopping list styles */
.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  line-height: 1;
}

.btn-reorder {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.shopping-list-table .qty-input {
  width: 80px;
  margin: 0 auto;
}

@media print {
  @page { margin: 12mm; size: landscape; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .app-shell { display: block; min-height: 0; }
  .sidebar, .page-title, .filter-bar, .app-footer, .shop-image-preview, .no-print, .btn-qty-adjust, .btn-reorder { display: none !important; }
  .stock-tab-panel[hidden] { display: block !important; }
  .stock-tab-panel:not(.journal-panel) { display: none !important; }
  .content { display: block; min-height: 0; padding: 0; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .print-header { display: block; margin-bottom: 12px; }
  .print-header h2 { font-size: 16pt; margin: 0 0 4px; }
  .print-header p { color: #444; margin: 0; }
  .table-responsive { overflow: visible; }
  .table { border-collapse: collapse; width: 100%; }
  .articles-table thead th { background: #f0f0f0 !important; color: #000; font-size: 8pt; padding: 5px; }
  .articles-table tbody td { color: #000; font-size: 8pt; padding: 5px; }
  .table-warning > * { background-color: #fff4c2 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .article-thumb, .article-thumb-placeholder { height: 34px; width: 34px; }
  .table-sort-link { color: #000; text-decoration: none; }
  .article-label-actions { display: none !important; }
  .article-label-sheet { box-shadow: none; display: block; padding: 0; }
  .article-label-card { break-inside: avoid; box-shadow: none; margin: 0 auto; }
}

/* Stock Adjustment Modal Styles */
#qtyAdjustModal .modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
  background-color: var(--surface);
}

#qtyAdjustModal .modal-header {
  border-bottom: 1px solid var(--line);
  background-color: var(--navy);
  color: #fff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  padding: 16px 24px;
}

#qtyAdjustModal .modal-header .modal-title {
  font-weight: 700;
  letter-spacing: -0.3px;
}

#qtyAdjustModal .modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#qtyAdjustModal .modal-header .btn-close:hover {
  opacity: 1;
}

#qtyAdjustModal .modal-body {
  padding: 24px;
}

#qtyAdjustModal .modal-footer {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
}

#qtyAdjustModal .form-label {
  color: var(--navy);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

#qtyAdjustModal .form-control, 
#qtyAdjustModal .form-select {
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

#qtyAdjustModal .btn {
  padding: 10px 20px;
  font-size: 0.95rem;
}

.modal-backdrop {
  background-color: rgba(21, 40, 54, 0.3) !important;
}

@supports (backdrop-filter: blur(4px)) {
  .modal-backdrop.show {
    backdrop-filter: blur(4px);
    background-color: rgba(21, 40, 54, 0.3) !important;
  }
}

/* ==========================================================================
   INVENTORY UI/UX & RESPONSIVE UPGRADES (Tablets & Mobile & Print)
   ========================================================================== */

/* 1. Visual Stock Progress Bar */
.stock-progress-track {
  width: 100px;
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.stock-progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}
.stock-progress-bar.red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
.stock-progress-bar.yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.stock-progress-bar.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.stock-progress-bar.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 2. Premium Qty Adjust Counter */
.qty-adjust-wrap {
  display: inline-flex;
  align-items: center;
  background-color: #f3f4f6;
  border-radius: 30px;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.btn-qty-adjust {
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  border: none;
  background-color: #fff;
  color: var(--navy, #1e3a8a);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  cursor: pointer;
}
.btn-qty-adjust:hover:not(:disabled) {
  background-color: #e0e7ff;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.btn-qty-adjust:active:not(:disabled) {
  transform: scale(0.95);
}
.btn-qty-adjust:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.qty-value {
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--navy, #1e3a8a);
}

/* 3. Dropdown Menu Trigger in Table */
.btn-dots-trigger {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1;
}
.btn-dots-trigger:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* 4. Responsive table cell grouping and hiding */
.mobile-details {
  display: none;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Responsive Rules for Tablet and Mobile */
@media (max-width: 991.98px) {
  /* Hide columns on tablets */
  .col-hide-tablet {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  /* Hide columns on phones */
  .col-hide-phone {
    display: none !important;
  }
  .mobile-details {
    display: block; /* Show combined details under name */
  }
  .articles-table td, .articles-table th {
    padding: 8px 6px !important;
  }
  /* Smaller thumb on mobile */
  .article-thumb {
    width: 28px;
    height: 28px;
  }
  .qty-value {
    min-width: 24px;
    font-size: 0.85rem;
  }
  .btn-qty-adjust {
    width: 24px;
    height: 24px;
  }
}

/* 5. Print Layout Improvements for Page Breaks & Count Sheets */
@media print {
  /* Hide all buttons and inputs in the tables */
  .btn-dots-trigger, .btn-qty-adjust, .qty-adjust-wrap button {
    display: none !important;
  }
  
  /* Make sure the scrollable container does not truncate */
  .table-responsive {
    overflow: visible !important;
  }
  
  /* Custom print elements */
  .print-only-block {
    display: block !important;
  }
  .print-only-inline {
    display: inline !important;
  }
  
  /* Location page break styling */
  .print-location-section {
    page-break-before: always;
    break-before: page;
  }
  
  /* Hide first section page break, but allow on subsequent ones */
  .print-location-section:first-of-type {
    page-break-before: avoid !important;
    break-before: avoid !important;
  }

  /* Zähllisten-Modus (CSS driven when class .print-count-mode is set on body) */
  body.print-count-mode .print-hide-count {
    display: none !important;
  }
  
  body.print-count-mode .print-show-count-line {
    display: table-cell !important;
  }
  
  /* Style for manual counting line */
  .manual-count-line {
    border-bottom: 1px solid #000;
    width: 60px;
    display: inline-block;
    height: 15px;
    margin-left: 5px;
  }
  
  .print-signature-footer {
    display: block !important;
    margin-top: 30px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    font-size: 9pt;
  }
  
  /* Adjust margins for printing */
  @page {
    margin: 10mm;
    size: portrait !important; /* portrait is better for checklist printing */
  }
  
  body {
    font-size: 9pt;
  }
  
  .table td, .table th {
    padding: 6px !important;
    font-size: 8pt !important;
  }
}

/* Hide print-only elements on screen */
.print-only-block, .print-signature-footer {
  display: none;
}
.print-show-count-line {
  display: none;
}

/* 6. Modern Status indicator badge with pulsing dot */
.traffic-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: none;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  width: auto;
  vertical-align: middle;
}

.traffic-light .light {
  display: none;
}

.traffic-light .light.active {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
  flex-shrink: 0;
}

/* Green (OK) */
.traffic-light:has(.light.green.active) {
  background-color: #ecfdf3;
  border-color: #a6f4c5;
}
.traffic-light:has(.light.green.active) .light.green.active {
  background-color: #12b76a;
}
.traffic-light:has(.light.green.active)::after {
  content: 'Bestand OK';
  color: #027a48;
}

/* Yellow (Warning) */
.traffic-light:has(.light.yellow.active) {
  background-color: #fffbeb;
  border-color: #fec84b;
}
.traffic-light:has(.light.yellow.active) .light.yellow.active {
  background-color: #f79009;
}
.traffic-light:has(.light.yellow.active)::after {
  content: 'Kritisch';
  color: #b54708;
}

/* Red (Out of Stock) */
.traffic-light:has(.light.red.active) {
  background-color: #fef3f2;
  border-color: #fda29b;
}
.traffic-light:has(.light.red.active) .light.red.active {
  background-color: #d92d20;
}
.traffic-light:has(.light.red.active)::after {
  content: 'Leer';
  color: #b42318;
}

/* Pulse animation on the active dot */
.traffic-light .light.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.status-cell {
  white-space: nowrap;
}

/* 7. Sticky Table Headers */
.articles-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--surface) !important;
  border-bottom: 2px solid var(--line);
}
@media (max-width: 900px) {
  .articles-table thead th {
    top: 58px; /* Below sticky mobile app bar */
  }
}

/* 8. Touch-Optimized Cards for Mobile */
@media (max-width: 768px) {
  .articles-table, 
  .articles-table thead, 
  .articles-table tbody, 
  .articles-table tr, 
  .articles-table td, 
  .articles-table th {
    display: block;
    width: 100%;
  }
  
  .articles-table thead {
    display: none; /* Hide headers on mobile */
  }
  
  .articles-table tbody tr {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    position: relative;
  }
  
  .articles-table tbody tr:hover td {
    background-color: transparent !important;
  }
  
  .articles-table td {
    padding: 0 !important;
    border: 0 !important;
  }
  
  /* Image column span */
  .articles-table td:nth-child(2) {
    grid-row: span 2;
    align-self: start;
  }
  
  .articles-table td:nth-child(3) { /* Article Name */
    grid-column: 2;
  }
  
  .articles-table td:nth-child(1) { /* Status Cell */
    grid-column: 2;
    margin-top: 4px;
  }
  
  .articles-table td:nth-child(4) { /* Bestand dort */
    grid-column: 1 / span 2;
    margin-top: 12px;
    background-color: #f8fafc;
    padding: 10px 14px !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }
  .articles-table td:nth-child(4)::before {
    content: 'Bestand dort:';
    font-weight: 700;
    color: var(--navy);
    font-size: 0.9rem;
  }
  
  .articles-table td:nth-child(6) { /* Gesamt */
    grid-column: 1 / span 2;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .articles-table td:nth-child(6)::before {
    content: 'Gesamtbestand:';
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }
  
  .articles-table td:nth-child(9) { /* Actions dropdown position */
    position: absolute;
    top: 12px;
    right: 12px;
  }
  
  .articles-table td.col-hide-phone,
  .articles-table td.print-show-count-line {
    display: none !important;
  }
}

/* 9. Zähllisten Print Layout Improvements */
@media print {
  /* Writing line styling for counting list */
  .manual-count-line {
    border-bottom: 1.5px dashed #666 !important;
    width: 70px !important;
    display: inline-block;
    height: 18px;
    margin-left: 5px;
    vertical-align: bottom;
  }
  
  /* Location page break styling */
  .print-location-section {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 24px !important;
  }
}

/* 10. Table Column Widths & Layout Optimizations for Desktop */
@media (min-width: 769px) {
  /* Prevent table from expanding infinitely and forcing horizontal scroll */
  .location-group-section .articles-table {
    table-layout: auto;
    width: 100% !important;
    min-width: 690px;
  }
  
  /* Constrain Article Name Column */
  .location-group-section .articles-table th:nth-child(3),
  .location-group-section .articles-table td:nth-child(3) {
    width: 220px;
    max-width: 300px;
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
  }

  /* Fixed Status Cell width */
  .location-group-section .articles-table th:nth-child(1),
  .location-group-section .articles-table td:nth-child(1) {
    width: 95px;
    min-width: 95px;
  }

  /* Fixed Image Cell width */
  .location-group-section .articles-table th:nth-child(2),
  .location-group-section .articles-table td:nth-child(2) {
    width: 60px;
    min-width: 60px;
    text-align: center;
  }

  /* Fixed Qty Cell width */
  .location-group-section .articles-table th:nth-child(4),
  .location-group-section .articles-table td:nth-child(4) {
    width: 95px;
    min-width: 95px;
  }
  
  /* Fixed Total Cell width */
  .location-group-section .articles-table th:nth-child(6),
  .location-group-section .articles-table td:nth-child(6) {
    width: 95px;
    min-width: 95px;
  }

  /* Fixed Minimum & Soll Cell width */
  .location-group-section .articles-table th:nth-child(7),
  .location-group-section .articles-table td:nth-child(7),
  .location-group-section .articles-table th:nth-child(8),
  .location-group-section .articles-table td:nth-child(8) {
    width: 50px;
    min-width: 50px;
    text-align: center;
  }

  /* Fixed Actions Cell width */
  .location-group-section .articles-table th:nth-child(9),
  .location-group-section .articles-table td:nth-child(9) {
    width: 40px;
    min-width: 40px;
    text-align: right;
  }

  /* Make sure table header looks clean */
  .location-group-section .articles-table thead th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  
  .location-group-section .articles-table tbody td {
    padding: 8px 8px;
    font-size: 0.85rem;
  }
}

/* 11. Layout adjustments for Medium Screens to prevent sidebar crowding */
@media (min-width: 901px) and (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }
  .content {
    padding: 20px;
  }
}





/* GERL. PraxisLager - Redesigned Inventory Table Styles */

/* 1. Hierarchical Navigation Tabs */
.location-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.location-nav-tab {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.location-nav-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.location-nav-tab.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 4px 10px rgba(21, 40, 54, 0.12);
}

.location-sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.location-sub-tab {
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.location-sub-tab:hover {
  color: var(--brand);
  background: rgba(251, 140, 156, 0.06);
}
.location-sub-tab.is-active {
  background: var(--line);
  color: var(--navy);
  font-weight: 600;
}

/* 2. Quick Filters pills */
.quick-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
}
.quick-filter-btn {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.quick-filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.quick-filter-btn.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 3px 8px rgba(251, 140, 156, 0.25);
}

/* 3. Table Column and Elements Redesign */
.inventory-flat-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.inventory-flat-table tbody tr {
  transition: background-color 0.15s ease;
}
.inventory-flat-table tbody tr:hover {
  background-color: rgba(21, 40, 54, 0.02) !important;
}

/* Status Pill Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill.status-leer {
  background-color: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}
.status-pill.status-nachbestellen {
  background-color: #ffedd5;
  color: #ea580c;
  border-color: #fdba74;
}
.status-pill.status-bestellt {
  background-color: #dbeafe;
  color: #2563eb;
  border-color: #93c5fd;
}
.status-pill.status-ok {
  background-color: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}
.status-pill.status-ohne_lagerort {
  background-color: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}
.status-pill.status-nicht_inventarisiert {
  background-color: #f3f4f6;
  color: #4b5563;
  border-color: #d1d5db;
}

/* Inline Article Thumbnails & Details */
.article-img-container {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
.article-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.article-thumb-placeholder-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #f8fafc;
  color: #94a3b8;
}
.article-cell-content {
  display: flex;
  align-items: center;
  min-width: 0;
}
.article-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.article-name-link {
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-cell-content:hover .article-name-link {
  color: var(--brand-hover);
}
.article-sub-text {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bestand / Soll Column */
.stock-soll-cell {
  font-size: 0.95rem;
}
.stock-soll-cell.stock-danger .qty-value {
  color: #ef4444;
}
.stock-soll-cell.stock-warning .qty-value {
  color: #f97316;
}
.stock-soll-cell.stock-ok .qty-value {
  color: #22c55e;
}
.stock-missing-text {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 2px;
}

/* Lagerort Column */
.location-cell-text {
  display: inline-block;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--navy-light);
  vertical-align: middle;
}
.location-missing {
  color: #ef4444;
  font-weight: 600;
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  display: inline-block;
}

/* Letzte Bewegung Column */
.movement-cell {
  font-size: 0.8rem;
  color: var(--muted);
}
.movement-direction {
  font-weight: 600;
  font-size: 0.8rem;
}
.movement-direction.direction-in {
  color: #16a34a;
}
.movement-direction.direction-out {
  color: #dc2626;
}

/* Actions Column Wrapper & Sticky Header/Cells */
.actions-cell-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.actions-cell-wrap .btn-reorder {
  font-weight: 600;
}
.inventory-flat-table th:last-child,
.inventory-flat-table td:last-child {
  position: sticky;
  right: 0;
  background-color: var(--surface);
  z-index: 4;
  box-shadow: -6px 0 10px -4px rgba(21, 40, 54, 0.08);
}
.inventory-flat-table tr:hover td:last-child {
  background-color: #f8fafc !important;
}

/* Flash animation for direct Qty booking */
.flash-success {
  animation: flash-green 0.8s ease;
}
@keyframes flash-green {
  0% { background-color: rgba(22, 163, 74, 0.2); }
  100% { background-color: transparent; }
}

/* 4. Responsive Media Queries */
@media (max-width: 991px) {
  .col-hide-tablet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Flatten Table into Mobile Cards */
  .inventory-flat-table thead {
    display: none;
  }
  .inventory-flat-table,
  .inventory-flat-table tbody,
  .inventory-flat-table tr,
  .inventory-flat-table td {
    display: block;
    width: 100% !important;
  }
  .inventory-flat-table tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
  }
  .inventory-flat-table td {
    border: none !important;
    padding: 6px 0 !important;
    text-align: left !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
  }
  
  /* Reset special cell properties on mobile */
  .inventory-flat-table td.article-cell {
    display: block;
    padding-bottom: 10px !important;
    border-bottom: 1px dashed var(--line) !important;
    margin-bottom: 6px;
  }
  .inventory-flat-table td:last-child {
    position: static !important;
    box-shadow: none !important;
    border-top: 1px solid var(--line) !important;
    padding-top: 10px !important;
    margin-top: 6px;
    justify-content: flex-end;
  }
  
  /* Show mobile label */
  .inventory-flat-table .mobile-label {
    display: inline-block !important;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .inventory-flat-table .mobile-value {
    display: inline-block;
    text-align: right;
  }
  
  .location-cell-text {
    max-width: 200px;
  }
  .stock-soll-cell .stock-missing-text {
    display: inline-block;
    margin-left: 6px;
    margin-top: 0;
  }
}

/* --- GERL Shop Enhancements --- */
#shopTab .nav-link {
  color: var(--muted);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.25s ease;
  margin-right: 8px;
}
#shopTab .nav-link:hover {
  color: var(--navy);
  background: #f8fafc;
}
#shopTab .nav-link.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.shop-article-cell {
  display: flex;
  align-items: center;
}
.shop-image-container {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  cursor: pointer;
}
.shop-article-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.shop-article-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--muted);
}
.shop-article-title {
  font-weight: 700;
  color: var(--navy);
  display: block;
  line-height: 1.25;
}
.shop-article-meta {
  font-size: 0.8rem;
  margin-top: 2px;
}
.shop-article-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  display: inline-block;
  margin-top: 2px;
}
.shop-article-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-status.in-stock {
  background-color: #eef8f3;
  color: #16a34a;
  border: 1px solid #b9dfcd;
}
.badge-status.variant-in-stock {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.badge-status.shop-article {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid var(--line);
}

.shop-manual-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.form-section-group {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}
.form-section-title {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.form-section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}
.form-section-grid .span-2 {
  grid-column: span 2;
}
.form-section-grid .span-3 {
  grid-column: span 3;
}

.shop-detail-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}
.modal-product-visuals {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-product-image-container {
  width: 100%;
  height: 280px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.modal-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-product-info {
  width: 100%;
}
.modal-product-title {
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.modal-product-price {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-price-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.modal-price-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}
.modal-product-meta-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  width: 100%;
}
.modal-product-meta-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}
.modal-product-meta-list li span:first-child {
  color: var(--muted);
  font-weight: 500;
}
.modal-product-meta-list li span:last-child {
  font-weight: 700;
  color: var(--navy);
}
.modal-product-description-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.modal-desc-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.modal-desc-text {
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 24px;
  white-space: pre-line;
  flex-grow: 1;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}
.modal-order-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: auto;
}

@media (max-width: 991px) {
  .shop-detail-modal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  font-size: 0.8rem;
  margin-top: 2px;
}
.shop-article-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  display: inline-block;
  margin-top: 2px;
}
.shop-article-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-status.in-stock {
  background-color: #eef8f3;
  color: #16a34a;
  border: 1px solid #b9dfcd;
}
.badge-status.variant-in-stock {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.badge-status.shop-article {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid var(--line);
}

.shop-manual-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.form-section-group {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}
.form-section-title {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.form-section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}
.form-section-grid .span-2 {
  grid-column: span 2;
}
.form-section-grid .span-3 {
  grid-column: span 3;
}

.shop-detail-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}
.modal-product-visuals {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-product-image-container {
  width: 100%;
  height: 280px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.modal-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-product-info {
  width: 100%;
}
.modal-product-title {
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.modal-product-price {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-price-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.modal-price-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}
.modal-product-meta-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  width: 100%;
}
.modal-product-meta-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}
.modal-product-meta-list li span:first-child {
  color: var(--muted);
  font-weight: 500;
}
.modal-product-meta-list li span:last-child {
  font-weight: 700;
  color: var(--navy);
}
.modal-product-description-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.modal-desc-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.modal-desc-text {
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 24px;
  white-space: pre-line;
  flex-grow: 1;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}
.modal-order-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: auto;
}

@media (max-width: 991px) {
  .shop-detail-modal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (max-width: 768px) {
  .form-section-grid {
    grid-template-columns: 1fr !important;
  }
  .form-section-grid .span-2,
  .form-section-grid .span-3 {
    grid-column: span 1 !important;
  }
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s;
}
.sortable-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.sort-indicator {
  font-size: 0.75rem;
  margin-left: 4px;
  opacity: 0.6;
}

.hover-link-opacity {
  transition: opacity 0.15s ease-in-out;
}
.hover-link-opacity:hover {
  opacity: 0.75;
  text-decoration: underline !important;
}
