/* Scoped visual prototype. This stylesheet has no selectors outside .a7n-root. */
.a7n-root { color: var(--text-color, inherit); padding: 0 0 56px; font-size: 13px; }
.a7n-root .a7n-h1 { font-size: 22px; font-weight: 650; line-height: 1.3; margin: 0; }
.a7n-root .a7n-muted { color: var(--text-muted-color, #81909e); font-size: 12px; }
.a7n-root .a7n-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; padding: 14px 0 12px; }
.a7n-root .a7n-toolbar { display:flex;flex-wrap:wrap;gap:7px;align-items:center; }
.a7n-root .a7n-link { display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border-color,#d1dbe5);border-radius:5px;padding:6px 10px;color:inherit;text-decoration:none;background:var(--panel-bg,#fff);cursor:pointer; }
.a7n-root .a7n-link:hover { text-decoration:none; background:var(--hover-bg,#edf3fa); }
.a7n-root .a7n-tabs { display:flex;gap:5px;flex-wrap:wrap;margin:12px 0 14px;border-bottom:1px solid var(--border-color,#d9e1e9);padding-bottom:8px; }
.a7n-root .a7n-tab { background:transparent;color:inherit;padding:9px 13px;cursor:pointer;border:0;border-radius:4px; }
.a7n-root .a7n-tab[aria-selected='true'] {color:var(--primary-color,#2c59a5);font-weight:700;background:var(--hover-bg,#eaf0f7);border-bottom:2px solid var(--primary-color,#2c59a5);}
.a7n-root .a7n-panel {border:1px solid var(--border-color,#d7dfe8);border-radius:5px;background:var(--panel-bg,#fff);margin:9px 0 13px;overflow:hidden;}
.a7n-root .a7n-panel-title { font-size:14px;background:var(--primary-color,#2957a3);color:#fff;padding:9px 12px;margin:0;font-weight:650; }
.a7n-root .a7n-panel-body { padding:13px; }
.a7n-root .a7n-stats {display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px;}
.a7n-root .a7n-stat {border:1px solid var(--border-color,#dbe3ec);padding:11px 12px;border-radius:4px;min-width:0;}
.a7n-root .a7n-stat-title { font-size:12px;color:var(--text-muted-color,#718294);margin-bottom:5px;}
.a7n-root .a7n-stat-value {font-variant-numeric:tabular-nums;font-weight:700;word-break:break-word;}
.a7n-root .a7n-text-block{white-space:pre-wrap;word-break:break-word;min-height:25px;}
.a7n-root .a7n-tablewrap {overflow-x:auto;width:100%;overscroll-behavior-x:contain;}
.a7n-root .a7n-table {width:100%;min-width:1120px;border-collapse:collapse;font-size:12px;}
.a7n-root .a7n-table th,.a7n-root .a7n-table td {padding:9px 10px;border-bottom:1px solid var(--border-color,#e0e5ea);vertical-align:top;white-space:nowrap;}
.a7n-root .a7n-table th {font-weight:600;color:var(--text-muted-color,#6b7e91);position:sticky;top:0;background:var(--panel-bg,#fff);z-index:1;}
.a7n-root .a7n-table td.a7n-num{text-align:right;font-variant-numeric:tabular-nums;}
.a7n-root .a7n-table td.a7n-desc {min-width:280px;max-width:430px;white-space:normal;word-break:break-word;}
.a7n-root .a7n-catalog {color:var(--primary-color,#2957a3);font-weight:600;}
.a7n-root .a7n-source {white-space:nowrap;font-size:11px;font-weight:400;color:var(--text-muted-color,#718294);margin-left:5px;}
.a7n-root .a7n-sum {background:var(--panel-bg,#fff);border-top:2px solid var(--border-color,#d8dce4);padding:12px;}
.a7n-root .a7n-loading {padding:38px;text-align:center;color:var(--text-muted-color,#81909e);}
.a7n-root .a7n-warning {padding:12px;border:1px solid var(--border-color,#d1dbe5);border-radius:5px;color:inherit;}
.a7n-root .a7n-terms {display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;}
.a7n-root .a7n-bottom {position:sticky;bottom:0;display:flex;justify-content:space-between;gap:10px;align-items:center;background:var(--panel-bg,#fff);border-top:1px solid var(--border-color,#cbd4df);padding:10px 12px;box-shadow:0 -2px 12px #0000000a;flex-wrap:wrap;}
@media(max-width:760px){.a7n-root .a7n-h1{font-size:18px}.a7n-root .a7n-panel-body{padding:9px}.a7n-root .a7n-tab{padding:8px}.a7n-root .a7n-table{min-width:1000px}}

/* R6: PDF link-buttons and native-looking READ-ONLY switches; strictly new-view scoped. */
.a7n-root .a7n-pdf-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-bottom:11px; }
.a7n-root .a7n-pdf-setting { display:flex;flex-direction:column;gap:8px;min-height:69px;border:1px solid var(--border-color,#dbe3ec);padding:10px 12px;border-radius:4px; }
.a7n-root .a7n-pdf-setting-label {font-size:12px;color:var(--text-muted-color,#718294);}
.a7n-root .a7n-pdf-setting-display {display:flex;align-items:center;gap:9px;}
.a7n-root .a7n-pdf-setting-value {font-size:12px;color:var(--text-color,inherit);font-weight:600;}
.a7n-root .a7n-switch {position:relative;display:inline-block;flex:0 0 35px;width:35px;height:20px;border-radius:20px;vertical-align:middle;cursor:default;}
.a7n-root .a7n-switch-on {background:var(--primary-color,#2957a3);}
.a7n-root .a7n-switch-off {background:var(--border-color,#bec8d1);}
.a7n-root .a7n-switch-unknown {background:#9aa7b4;}
.a7n-root .a7n-switch-knob {display:block;width:16px;height:16px;position:absolute;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;}
.a7n-root .a7n-switch-on .a7n-switch-knob {left:17px;}
.a7n-root .a7n-pdf-labels {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;}
.a7n-root .a7n-pdf-note {margin:10px 0 0;}
.a7n-root .a7n-pdf-note a {color:var(--primary-color,#2957a3);}
.a7n-root .a7n-pdf-action {font-weight:600;}
.a7n-root .a7n-link-disabled {opacity:.6;cursor:not-allowed;}

/* R7/R5 in-place native editor: scoped ONLY to the test page. */
.a7n-root .a7n-edit-tools { display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap; }
.a7n-root [data-a7-edit-inline],
.a7n-root [data-a7-save-inline],
.a7n-root [data-a7-cancel-inline] { font:inherit;cursor:pointer; }
.a7n-root [data-a7-save-inline] { background:var(--primary-color,#38599b);color:#fff; }
.a7n-root [data-a7-cancel-inline] { border-color:var(--border-color,#cbd5df); }
.a7n-root .a7n-edit-tools [hidden] { display:none !important; }
.a7n-root .a7n-inline-native:empty { display:none; }
.a7n-root .a7n-inline-native .detail .middle-tabs,
.a7n-root .a7n-inline-native .detail .button-container,
.a7n-root .a7n-inline-native .detail .side,
.a7n-root .a7n-inline-native .detail .bottom { display:none !important; }
.a7n-root .a7n-inline-native .middle { margin:0;padding:0; }
.a7n-root .a7n-inline-native .middle > .panel { clear:both;float:none !important;width:100% !important;
    border:1px solid var(--border-color,#dce3ec);border-radius:5px;overflow:visible;margin:0 0 14px; }
.a7n-root .a7n-inline-native .middle > .panel.tab-hidden,
.a7n-root .a7n-inline-native .middle > .panel.hidden { display:none !important; }
.a7n-root .a7n-inline-native .middle > .panel > .panel-heading {
    background:var(--primary-color,#38599b);color:#fff;min-height:34px;padding:8px 13px; }
.a7n-root .a7n-inline-native .middle > .panel > .panel-body { padding:12px 14px; }
.a7n-root .a7n-inline-native .middle .cell { min-width:0; }
.a7n-root .a7n-inline-native .middle [data-name="pozycjaWycenies"] .field,
.a7n-root .a7n-inline-native .middle [data-name="pozycjaWycenyRobociznies"] .field,
.a7n-root .a7n-inline-native .middle [data-name="pozycjaWycenyKonserwacjis"] .field {
    overflow-x:auto;max-width:100%; }
@media (max-width: 800px) {
    .a7n-root .a7n-inline-native .middle > .panel > .panel-body { padding:8px; }
    .a7n-root .a7n-edit-tools { gap:4px; }
}
/* R6 M+U L2 — ONLY isolated native listView rendering. Original EBLA field DOM remains.
   Load through the new test route CSS, not global CSS. All colors follow Espo variables. */
.a7r4-root .a7r6-mu-native-table,
.a7n-root .a7r6-mu-native-table {
  width:100%; min-width:1180px; border-collapse:collapse; table-layout:auto;
  font-size:12px; font-variant-numeric:tabular-nums;
  background:var(--panel-bg,#fff);
}
.a7r4-root .a7r6-mu-native-table th,
.a7r4-root .a7r6-mu-native-table td,
.a7n-root .a7r6-mu-native-table th,
.a7n-root .a7r6-mu-native-table td {
  padding:8px 9px!important; border-bottom:1px solid var(--border-color,#dfe4ea);
  vertical-align:middle; white-space:nowrap;
}
.a7r4-root .a7r6-mu-native-table th,
.a7n-root .a7r6-mu-native-table th {
  font-weight:600; color:var(--text-muted-color,#657488);
  background:var(--panel-bg,#fff); position:sticky; top:0; z-index:1;
}
/* Remove only the visible CATALOG COLUMN after the native list has validated
   row view identity and attached its controls. The native link field and both
   Name/Id inputs stay in their original TD and retain their existing selectors. */
.a7r4-root .a7r6-mu-native-table th[data-name='pozycjacennika'],
.a7r4-root .a7r6-mu-native-table td.cell[data-name='pozycjacennika'],
.a7n-root .a7r6-mu-native-table th[data-name='pozycjacennika'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='pozycjacennika'] {display:none!important;}
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='name'],
.a7n-root .a7r6-mu-native-table :is(th,td).cell[data-name='name'] {
  width:30%; min-width:320px; max-width:580px;
  white-space:normal; overflow-wrap:anywhere;
}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='name'] .cell-wrapper,
.a7n-root .a7r6-mu-native-table td.cell[data-name='name'] .cell-wrapper {max-width:none!important;overflow:visible!important;text-overflow:clip!important;}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='name'] input[type='text'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='name'] input[type='text'] {
  width:100%;min-width:170px;max-width:100%;box-sizing:border-box;
}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='name'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='name'] {color:var(--link-color,#457caf);font-weight:500;}
.a7r6-mu-name-controls {display:inline-flex;gap:4px;align-items:center;margin-inline-start:7px;vertical-align:middle;white-space:nowrap;}
.a7r6-mu-name-action {
  border:1px solid var(--border-color,#d0d7df);border-radius:5px;
  background:var(--panel-bg,#fff);color:var(--text-color,#334155);
  cursor:pointer;font-size:11px;font-weight:500;line-height:18px;
  padding:3px 7px;min-height:27px;
}
.a7r6-mu-name-action:disabled {opacity:.45;cursor:not-allowed;}
.a7r6-mu-name-action:not(:disabled):hover {background:var(--background-color,#eef3f7);}
.a7r6-mu-name-clear {font-size:16px;min-width:27px;padding:2px 5px;}
.a7r6-mu-source-label {font-size:10px;font-weight:400;color:var(--text-muted-color,#66768b);margin-inline-start:7px;}
.a7r6-mu-name-fallback {font-weight:500;color:var(--link-color,#457caf);}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='lp'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='lp'] {width:48px;text-align:center;}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='ilosc'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='ilosc'] {min-width:55px;}
.a7r4-root .a7r6-mu-native-table td.cell[data-name='jm'],
.a7n-root .a7r6-mu-native-table td.cell[data-name='jm'] {min-width:55px;}
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='priceNet'],
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='wartosc'],
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='priceMsrp'],
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='cenaporabacie'],
.a7r4-root .a7r6-mu-native-table :is(th,td).cell[data-name='wartoscporabacie'] {text-align:right;}
/* Native vendor/R35 drag handles, selection checkbox and trash remain untouched. */
.a7r4-root .a7r6-mu-native-table :is(.drag-handle-cell,[data-name='a7-bulk35']) {white-space:nowrap;}
@media(max-width:900px){
  .a7r4-root .a7r6-mu-native-table,
  .a7n-root .a7r6-mu-native-table {min-width:1250px;}
}

/* The original native field occupies one part of the R6 name column. Its
   selector/DOM is unchanged; the added Cennik action sits beside it, not below. */
.a7r4-root .a7r6-mu-native-table td.a7r6-mu-composite-edit .cell-wrapper,
.a7n-root .a7r6-mu-native-table td.a7r6-mu-composite-edit .cell-wrapper {
  display:inline-block!important;vertical-align:middle;
  width:calc(100% - 101px);min-width:150px;max-width:none!important;
}
.a7r4-root .a7r6-mu-native-table td.a7r6-mu-composite-edit .a7r6-mu-name-controls,
.a7n-root .a7r6-mu-native-table td.a7r6-mu-composite-edit .a7r6-mu-name-controls {
  margin-inline-start:5px;vertical-align:middle;
}
/* L3: UI-only additions to the original accepted R6 stylesheet.
   All styles limited to the new test route. Never changes R35 standard UI. */
.a7r6-l3-root .a7n-tab-section[hidden],
.a7r6-l3-root [data-a7-l3-edit][hidden],
.a7r6-l3-root [data-a7-l3-cancel][hidden] {display:none!important;}
.a7r6-l3-root .a7n-mu-native-host {min-height:40px; width:100%;}
.a7r6-l3-root .a7n-mu-native-host .detail {padding:0!important;margin:0!important;}
.a7r6-l3-root .a7n-mu-native-host .detail .middle {margin:0!important;padding:0!important;width:100%;}
.a7r6-l3-root .a7n-mu-native-host .detail .middle > .panel {
  width:100%!important;float:none!important;margin:0!important;padding:0!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
.a7r6-l3-root .a7n-mu-native-host .detail .middle > .panel > .panel-heading {display:none!important;}
.a7r6-l3-root .a7n-mu-native-host .detail .middle > .panel > .panel-body {padding:0!important;}
.a7r6-l3-root .a7n-mu-native-host .detail .middle > .panel > .panel-body > .row,
.a7r6-l3-root .a7n-mu-native-host .detail .middle > .panel > .panel-body > .row > [class*='col-'] {
  width:100%!important;max-width:100%!important;float:none!important;margin:0!important;
}
.a7r6-l3-root .a7n-mu-native-host .detail :is(.record-buttons,.edit-buttons,.button-container,.middle-tabs,.side,.bottom) {display:none!important;}
.a7r6-l3-root .a7n-mu-native-host .field[data-name='pozycjaWycenies'] {width:100%;min-width:0;overflow-x:auto;}
.a7r6-l3-root .a7n-panel-body .a7r6-mu-native-table {min-width:1160px;}
.a7r6-l3-root .a7n-tab-section > .a7n-panel:first-child {margin-top:0;}
.a7r6-l3-root .a7n-stat-value {word-break:normal;overflow-wrap:normal;min-width:0;}
.a7r6-l3-root .a7n-stats {grid-template-columns:repeat(4,minmax(0,1fr));}
@media(max-width:900px){.a7r6-l3-root .a7n-stats{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:540px){.a7r6-l3-root .a7n-stats{grid-template-columns:minmax(0,1fr);}}
/* P18: retain the L3 restrictions except the two P17 deferred delete actions.
   The route-owned list adds this marker only after the exact edit context and
   native row bindings pass. Removing the hide rule preserves native ACL/hidden
   styles; no display override can expose an action hidden by the native view. */
.a7r6-l3-root .a7n-mu-native-host :is(.drag-handle,
  [data-action='unlinkRelated'],[data-action='quickEdit']) {display:none!important;}
.a7r6-l3-root .a7n-mu-native-host :is(.remove-record,.remove-related):not([data-action='removeRelated']) {display:none!important;}
.a7r6-l3-root .a7n-mu-native-host table:not(.a7r6-mu-delete-ready)
  :is(.a7-bulk35-trash,[data-action='removeRelated']) {display:none!important;}
