/* Místní Zásoby: schválená varianta 2, geometrie nezávislá na délce názvů. */
html.compact-supplies { zoom:1 !important; --cs-scale:1; --fs-scale:var(--cs-scale); }
html.compact-supplies.font-small { --cs-scale:.9; }
html.compact-supplies.font-large { --cs-scale:1.12; }
html.compact-supplies.font-xlarge { --cs-scale:1.28; }
html.compact-supplies:not(.dark) { --bg:#f6f9fc; --surface:#fff; --surface2:#fafffc; --text:#134624; --text2:#5c9d72; --text3:#79ac8d; --accent:#2D6A4F; --accent-light:#f0eaff; --border:#caffe4; }
html.compact-supplies body { padding-inline:max(14px,env(safe-area-inset-left)); background:linear-gradient(145deg,var(--bg),var(--surface)); }
html.compact-supplies .app { max-width:1320px; }
html.compact-supplies [hidden] { display:none !important; }
html.compact-supplies #header-row2 { display:grid !important; grid-template-columns:minmax(140px,1fr) repeat(5,minmax(0,1fr)); gap:8px; width:100%; align-items:center; }
html.compact-supplies #header-row2 :is(.header-left-group,.header-right-group) { display:contents !important; }
html.compact-supplies .cs-heading { order:0; margin:0; height:44px; display:flex; align-items:center; font-weight:700; }
html.compact-supplies #add-supply-btn { order:1; }
html.compact-supplies #supply-dosage-btn, html.compact-supplies #supply-scan-btn { order:2; }
html.compact-supplies #supply-sort-wrap { order:3; }
html.compact-supplies #global-search-btn { order:4; }
html.compact-supplies #supply-export-btn { order:5; }
html.compact-supplies #header-row2 .h-tile { width:100% !important; min-width:0 !important; max-width:none !important; height:44px !important; min-height:0 !important; box-sizing:border-box; border:1px solid var(--border) !important; border-radius:4px !important; padding:5px !important; justify-content:center; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; line-height:1.2 !important; transform:none !important; transition-property:background-color,border-color,color,box-shadow !important; }
html.compact-supplies #supply-sort-wrap { width:100%; min-width:0; }
html.compact-supplies #supply-sort-dd { border-radius:4px !important; }
html.compact-supplies .cs-root { max-width:none !important; padding:4px 0 90px !important; }
html.compact-supplies .cs-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px !important; margin-bottom:12px !important; }
html.compact-supplies .cs-overview>div { height:72px; padding:7px !important; border-radius:4px !important; display:flex; flex-direction:column; justify-content:center; gap:4px; box-shadow:none !important; }
html.compact-supplies .cs-overview>div>div:first-child { padding:0 !important; font-size:calc(22px * var(--cs-scale)) !important; line-height:30px !important; height:30px; flex-shrink:0; }
html.compact-supplies .supply-top-stat-lbl { padding:0 !important; height:18px; flex-shrink:0; margin:0 !important; line-height:18px !important; white-space:nowrap; }
html.compact-supplies .cs-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-bottom:14px; }
html.compact-supplies :is(.cs-filter,.cs-detail,.cs-restock,.cs-more button,.cs-close) { box-sizing:border-box; min-width:0; height:44px !important; min-height:44px !important; border:1px solid var(--border) !important; border-radius:4px !important; padding:4px !important; background:var(--surface2) !important; color:var(--accent) !important; font-family:inherit; font-weight:600; line-height:1.2 !important; white-space:normal; text-overflow:clip; overflow:visible; cursor:pointer; transform:none !important; transition-property:background-color,border-color,color !important; }
html.compact-supplies .cs-filter[aria-pressed="true"] { background:var(--accent-light) !important; border-color:var(--accent) !important; }
html.compact-supplies .cs-table { border:1px solid var(--border); border-radius:4px; }
html.compact-supplies :is(.cs-table-head,.cs-row) { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,.85fr) minmax(0,1.1fr) minmax(0,1fr) minmax(0,1.35fr) minmax(0,1.7fr); gap:8px; align-items:center; padding:6px 10px; box-sizing:border-box; }
html.compact-supplies .cs-table-head { height:44px; background:var(--surface2); color:var(--text2); font-weight:600; }
html.compact-supplies .cs-table-head>span { min-width:0; max-height:32px; }
html.compact-supplies .cs-row { height:84px; border-top:1px solid var(--border); background:var(--surface); }
html.compact-supplies .cs-name-cell { min-width:0; display:flex; flex-direction:column; gap:3px; }
html.compact-supplies .cs-name { width:100%; height:34px; max-height:34px; text-align:left; border:0; padding:0; background:none; color:var(--text); font-family:inherit; font-weight:700; line-height:17px !important; overflow:hidden; overflow-wrap:anywhere; cursor:pointer; text-overflow:clip; }
html.compact-supplies .cs-full { text-align:left; width:100%; height:16px; line-height:16px !important; padding:0; border:0; background:none; color:var(--accent); font-family:inherit; cursor:pointer; }
html.compact-supplies :is(.cs-category,.cs-expiry,.cs-qty) { min-width:0; max-height:60px; white-space:normal; overflow-wrap:anywhere; line-height:1.2 !important; }
html.compact-supplies :is(.cs-category,.cs-expiry) { color:var(--text2); }
html.compact-supplies .cs-qty { color:var(--text); font-weight:700; }
html.compact-supplies .cs-status { display:flex; flex-direction:column; align-items:start; justify-content:center; gap:3px; min-width:0; }
html.compact-supplies .cs-badge { display:flex; align-items:center; justify-content:center; width:100%; height:26px; min-width:0; box-sizing:border-box; border:1px solid; border-radius:3px; padding:2px 3px; text-align:center; line-height:1.1 !important; }
html.compact-supplies .cs-three-states .cs-status { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px; }
html.compact-supplies .cs-three-states .cs-badge { height:28px; padding:1px 2px; white-space:normal; overflow-wrap:anywhere; }
html.compact-supplies .cs-three-states .cs-badge:first-child { grid-column:1 / -1; }
html.compact-supplies .cs-low { color:#985513; background:#fff8e8; border-color:#edcd91; }
html.compact-supplies :is(.cs-expired,.cs-expiring) { color:#a92d4e; background:#fff0f4; border-color:#e8b7c4; }
html.compact-supplies .cs-stock { color:#401765; background:#f4effb; border-color:#beabd9; }
html.compact-supplies .cs-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; align-items:center; min-width:0; }
html.compact-supplies .cs-restock { width:100% !important; max-width:none !important; color:#401765 !important; border-color:#beabd9 !important; background:#f4effb !important; }
html.compact-supplies .cs-more { display:flex; justify-content:end; gap:8px; margin-top:10px; }
html.compact-supplies .cs-more button { min-width:120px; padding-inline:10px !important; }
html.compact-supplies .cs-empty { text-align:center; padding:24px; color:var(--text2); }
html.compact-supplies .cs-dialog { box-sizing:border-box; margin:auto; width:min(460px,calc(100% - 24px)); max-height:calc(100dvh - 32px); overflow:auto; border:1px solid var(--border); border-radius:5px; padding:18px; background:var(--surface); color:var(--text); }
html.compact-supplies .cs-dialog::backdrop { background:#13462450; }
html.compact-supplies .cs-dialog h2 { margin:0 0 12px; font-size:20px; }
html.compact-supplies .cs-dialog p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:17px; line-height:1.5; user-select:text; }
html.compact-supplies .cs-close { width:100%; }
html.compact-supplies .ios-tab-bar { width:min(1320px,calc(100% - 28px)); max-width:1320px; left:50%; bottom:0; transform:translateX(-50%); padding:5px max(4px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); height:calc(76px + env(safe-area-inset-bottom)); box-sizing:border-box; border:1px solid var(--border); border-radius:5px 5px 0 0; background:var(--surface); box-shadow:0 -2px 8px #13462408; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
html.compact-supplies .tab-item { height:62px; min-height:0; border:1px solid transparent; border-radius:4px; }
html.compact-supplies .tab-item.active { background:#ede4f8; border-color:#ba9fd5; }
html.compact-supplies .tab-label { height:24px; line-height:1.2 !important; color:var(--text2) !important; font-weight:500; transition:none !important; overflow:visible; text-overflow:clip; }
html.compact-supplies .tab-item.active .tab-label { color:#491266 !important; }
html.compact-supplies .tab-icon { transform:none !important; filter:none; }
html.compact-supplies .tab-icon,html.compact-supplies .tab-icon svg { width:30px; height:30px; }
html.compact-supplies .tab-icon svg > rect { fill:transparent; stroke:none; }
html.compact-supplies .tab-icon svg > text { font-size:36px !important; }
html.compact-supplies.dark .cs-row { background:var(--surface); }
html.compact-supplies.dark .tab-item.active { background:#2b193d; }
@media (max-width:740px) {
  html.compact-supplies .cs-table { border:0; }
  html.compact-supplies .cs-table-head { display:none; }
  html.compact-supplies .cs-row { grid-template-columns:minmax(0,1fr) 84px; grid-template-rows:34px 20px 18px 18px; gap:2px 7px; height:112px; padding:7px; border:1px solid var(--border); border-radius:4px; margin-bottom:6px; }
  html.compact-supplies .cs-name-cell { display:contents; }
  html.compact-supplies .cs-name { grid-area:1 / 1; }
  html.compact-supplies .cs-full,html.compact-supplies .cs-category { display:none; }
  html.compact-supplies .cs-status { grid-area:2 / 1; flex-direction:row; gap:4px; }
  html.compact-supplies .cs-badge { height:20px; flex:1; }
  html.compact-supplies .cs-qty { grid-area:3 / 1; height:18px; }
  html.compact-supplies .cs-expiry::before { content:attr(data-label) ': '; }
  html.compact-supplies .cs-expiry { grid-area:4 / 1; height:18px; }
  html.compact-supplies .cs-actions { grid-area:1 / 2 / -1 / 3; grid-template-columns:minmax(0,1fr); gap:6px; align-content:space-between; align-self:stretch; }
  html.compact-supplies .cs-row.cs-three-states { grid-template-rows:34px 32px 14px 13px; row-gap:1px; }
  html.compact-supplies .cs-three-states .cs-status { gap:2px 4px; }
  html.compact-supplies .cs-three-states .cs-badge { height:15px; padding:0 2px; white-space:nowrap; }
  html.compact-supplies .cs-three-states .cs-qty { height:14px; line-height:1 !important; }
  html.compact-supplies .cs-three-states .cs-expiry { height:13px; line-height:1 !important; }
}
@media (max-width:600px) {
  html.compact-supplies body { padding-inline:10px; }
  html.compact-supplies #header-row2 { grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px; }
  html.compact-supplies .cs-heading { grid-column:1 / -1; height:30px; }
  html.compact-supplies #header-row2 :is(#add-supply-btn,#supply-dosage-btn,#supply-scan-btn,#supply-sort-wrap) { grid-column:span 2; }
  html.compact-supplies #header-row2 :is(#global-search-btn,#supply-export-btn) { grid-column:span 3; }
  html.compact-supplies .cs-overview { gap:5px !important; margin-bottom:8px !important; }
  html.compact-supplies .cs-overview>div { height:64px; padding:5px !important; gap:2px; }
  html.compact-supplies .cs-filters { gap:5px; margin-bottom:8px; }
  html.compact-supplies .cs-filter { font-size:11px; }
  html.compact-supplies .cs-more { flex-wrap:wrap; }
  html.compact-supplies .ios-tab-bar { width:100%; height:calc(68px + env(safe-area-inset-bottom)); border-radius:0; }
  html.compact-supplies .tab-item { height:56px; }
  html.compact-supplies .tab-icon,html.compact-supplies .tab-icon svg { width:25px; height:25px; }
}

html.compact-supplies #supply-export-btn [data-lang="btn_export"]::after { content:" CSV"; }
@media (min-width:741px) { html.compact-supplies .cs-three-states .cs-badge { word-break:break-all; } }
/* ===== Doladění Zásob: mezery, rohy 6 px, písmo, perleťové přechody (PC i telefon) ===== */
html.compact-supplies header { padding:8px 0 0; margin:0 0 6px; gap:8px; }
html.compact-supplies .cs-overview { margin-bottom:8px !important; }
html.compact-supplies .cs-filters { margin-bottom:8px; }
html.compact-supplies :is(#header-row2 .h-tile, #header-row2 button, #supply-sort-wrap > button, #supply-sort-dd, .cs-overview > div, .cs-filter, .cs-detail, .cs-restock, .cs-more button, .cs-close, .cs-table, .cs-card, #cloud-badge > *, #header-backup-tile, #lang-pill, .ios-tab-bar .tab-item) { border-radius:6px !important; }
html.compact-supplies #header-row2 .h-tile { font-weight:600 !important; }
@media (min-width:1101px) { html.compact-supplies #header-row2 { grid-template-columns:150px repeat(5,minmax(0,1fr)) 150px; } }
@media (max-width:600px) { html.compact-supplies header { gap:5px; padding:8px 0 0; margin-bottom:4px; } }
html.compact-supplies:not(.dark) {
  --bg:#f2edfc; --surface:#fff; --surface2:#f7f2ff; --text:#13492d; --text2:#518e71; --text3:#589379; --accent:#2D6A4F; --accent-light:#eee3ff; --border:#d9c9f4;
  --pearl-face:linear-gradient(135deg,#fffffff5,#fcfaffdf 52%,#eee6fcbd); --pearl-edge:#d9c9f4; --pearl-light:#ffffffed; --pearl-shade:#92d9bb29; --pearl-shadow:#519e8312;
}
html.compact-supplies.dark { --pearl-face:linear-gradient(135deg,#274337f5,#21352def 52%,#264139e8); --pearl-edge:#517f72; --pearl-light:#8cb3af2b; --pearl-shade:#0d241a2e; --pearl-shadow:#00000024; }
html.compact-supplies:not(.dark) body { background:radial-gradient(ellipse at 9% 4%,#dcfaee99,transparent 48%),radial-gradient(ellipse at 94% 36%,#ddf5f655,transparent 52%),linear-gradient(135deg,#f8fffc,#f2edfc 60%,#fafffd); background-attachment:fixed; }
html.compact-supplies :is(#header-row2 #global-search-btn, #supply-sort-wrap > button, #supply-export-btn, .cs-filter:not([aria-pressed="true"]), #lang-pill) { border-color:var(--pearl-edge) !important; background:var(--pearl-face) !important; box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow) !important; }
html.compact-supplies :is(.cs-overview > div, .cs-card) { box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 3px 8px var(--pearl-shadow) !important; background-image:linear-gradient(135deg,#ffffff70,#ffffff00 60%) !important; }
html.compact-supplies header :is(#badge-device, #badge-cloud, #header-backup-tile) { background-image:linear-gradient(135deg,#ffffff35,#ffffff08 58%,#a0cfc110) !important; box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 1px 3px var(--pearl-shadow) !important; }
html.compact-supplies .ios-tab-bar { border-color:var(--pearl-edge); background:var(--pearl-face); background-color:var(--surface); box-shadow:inset 0 1px 0 var(--pearl-light), 0 -2px 12px var(--pearl-shadow); }
html.compact-supplies .cs-root { margin-left:0 !important; margin-right:0 !important; padding-top:0 !important; }
html.compact-supplies #supply-sort-wrap { max-width:none !important; width:100% !important; }
html.compact-supplies #supply-sort-wrap > button { width:100% !important; }
html.compact-supplies #tab-zasoby > div { max-width:none !important; margin-left:0 !important; margin-right:0 !important; padding-top:0 !important; }
html.compact-supplies :is(#tab-zasoby > div > div > div, .supply-filter-btn, .supply-item, .note-item) { border-radius:6px !important; }
html.compact-supplies #tab-zasoby :is(.supply-filter-btn, .supply-item, .note-item) { box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 6px var(--pearl-shadow) !important; }
html.compact-supplies .supply-filter-tile { border-radius:6px !important; }
/* Jednotné mezery 8 px mezi všemi dlaždicemi a bloky na Zásobách (PC i telefon). */
html.compact-supplies #tab-zasoby > div > div:first-child { gap:8px !important; margin-bottom:8px !important; }
html.compact-supplies .supplies-desktop-cols { gap:8px !important; }
html.compact-supplies .supply-column { gap:8px !important; }
html.compact-supplies #header-row2 { gap:8px !important; }
@media (max-width:600px) { html.compact-supplies #tab-zasoby > div > div:first-child { gap:5px !important; margin-bottom:6px !important; } }
html.compact-supplies .supplies-mobile-view > div:first-child { gap:5px !important; margin-bottom:6px !important; }
html.compact-supplies .supplies-mobile-view .supplies-grid { gap:6px !important; }
@media (max-width:600px) { html.compact-supplies #header-row2 { gap:5px !important; } }
/* Karty zásob: výška podle obsahu (neroztahují se na výšku sloupce), stejné rohy 6 px i u tlačítek a štítků. */
html.compact-supplies .supplies-desktop-cols { align-items:start !important; }
html.compact-supplies .supply-column { align-self:start !important; height:auto !important; }
html.compact-supplies .supply-column > * { flex:0 0 auto !important; }
html.compact-supplies #tab-zasoby :is(.supply-item, .note-item) :is(button, span[style*="border-radius"], div[style*="border-radius"]) { border-radius:6px !important; }
html.compact-supplies #tab-zasoby .supply-item { min-height:92px; padding:10px 14px !important; }
html.compact-supplies .supply-col-header { border-radius:6px !important; margin-bottom:0 !important; }
html.compact-supplies .supply-col-cards { gap:8px !important; }
html.compact-supplies #tab-zasoby .supply-item { min-height:124px; box-sizing:border-box; }
@media (max-width:600px) { html.compact-supplies #tab-zasoby .supply-item { min-height:0; } html.compact-supplies .supply-col-cards { gap:6px !important; } }
@media (min-width:601px) { html.compact-supplies .supply-col-cards > div { min-height:124px !important; box-sizing:border-box; } }
/* ===== Zásoby: jednotný vzhled všech dlaždic (rámeček 1,5 px, stejná sytost, stejné pozadí a stín, stejné mezery) ===== */
html.compact-supplies { --zs-edge: color-mix(in srgb, var(--accent) 38%, transparent); }
html.compact-supplies #tab-zasoby > div { margin-top:2px !important; }
html.compact-supplies :is(#header-row2 #add-supply-btn, #header-row2 #supply-dosage-btn,#supply-scan-btn, #supply-sort-wrap > button, #header-row2 #global-search-btn, #header-row2 #supply-export-btn) {
  border:1.5px solid var(--zs-edge) !important; background:var(--pearl-face) !important; background-color:transparent !important;
  box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow) !important; }
html.compact-supplies :is(#tab-zasoby > div > div:first-child > div, .supply-col-header, .supply-col-cards > div) {
  background:var(--pearl-face) !important; border-width:1.5px !important; border-style:solid !important;
  box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow) !important; background-image:none; }
/* barvy rámečků: stejná sytost (55 % barvy) u všech dlaždic */
html.compact-supplies #tab-zasoby > div > div:first-child > div:nth-child(1) { border-color:rgba(130,140,170,.55) !important; }
html.compact-supplies #tab-zasoby > div > div:first-child > div:nth-child(2) { border-color:rgba(245,158,11,.55) !important; }
html.compact-supplies #tab-zasoby > div > div:first-child > div:nth-child(3) { border-color:rgba(244,63,94,.55) !important; }
html.compact-supplies .supply-column:nth-child(1) :is(.supply-col-header, .supply-col-cards > div) { border-color:rgba(244,63,94,.55) !important; }
html.compact-supplies .supply-column:nth-child(2) :is(.supply-col-header, .supply-col-cards > div) { border-color:rgba(2,132,199,.55) !important; }
html.compact-supplies .supply-column:nth-child(3) :is(.supply-col-header, .supply-col-cards > div) { border-color:rgba(92,246,178,.55) !important; }
html.compact-supplies .supply-col-cards > div[style*="ea580c"] { border-color:rgba(234,88,12,.55) !important; }
html.compact-supplies :is(#header-row2 #add-supply-btn, #header-row2 #supply-dosage-btn,#supply-scan-btn, #supply-sort-wrap > button, #header-row2 #global-search-btn, #header-row2 #supply-export-btn) { padding:0 6px !important; }
/* Rámeček karet zásob je v kódu zadaný přímo ve stylu (nejde přebít), proto se přes něj kreslí stejně sytý rámeček. */
html.compact-supplies .supply-col-cards > div { position:relative; }
html.compact-supplies .supply-col-cards > div::after { content:''; position:absolute; inset:-1.5px; border:1.5px solid var(--zs-card-edge, rgb(186,192,208)); border-radius:6px; pointer-events:none; }
html.compact-supplies .supply-column:nth-child(1) .supply-col-cards > div { --zs-card-edge: rgb(249,149,166); }
html.compact-supplies .supply-column:nth-child(2) .supply-col-cards > div { --zs-card-edge: rgb(116,187,224); }
html.compact-supplies .supply-column:nth-child(3) .supply-col-cards > div { --zs-card-edge: rgb(164,250,211); }
html.compact-supplies .supply-col-cards > div[style*="ea580c"] { --zs-card-edge: rgb(243,163,121) !important; }
html.compact-supplies :is(#header-row2 #add-supply-btn, #header-row2 #supply-dosage-btn,#supply-scan-btn, #supply-sort-wrap > button, #header-row2 #global-search-btn, #header-row2 #supply-export-btn)::after { display:none !important; }
/* Telefon: filtry a karty zásob stejně jako na PC (stejné pozadí, rámeček 1,5 px a sytost). */
html.compact-supplies :is(.supply-filter-tile, .supplies-grid > div) {
  background:var(--pearl-face) !important; border-width:1.5px !important; border-style:solid !important; border-color:rgba(27,67,50,.38) !important;
  box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow) !important; background-image:none; }
html.compact-supplies .supplies-grid > div { position:relative; }
html.compact-supplies .supplies-grid > div::after { content:''; position:absolute; inset:-1.5px; border:1.5px solid rgb(186,192,208); border-radius:6px; pointer-events:none; }
html.compact-supplies .supplies-grid > div[style*="244,63,94"]::after { border-color:rgb(249,149,166); }
html.compact-supplies .supplies-grid > div[style*="2,132,199"]::after { border-color:rgb(116,187,224); }
html.compact-supplies .supplies-grid > div[style*="ea580c"]::after { border-color:rgb(243,163,121); }
/* ===== Zásoby: všude stejná mezera 6 px, svisle i vodorovně, PC i telefon ===== */
html.compact-supplies header { gap:6px !important; margin-bottom:6px !important; }
html.compact-supplies #header-row2 { gap:6px !important; }
html.compact-supplies #tab-zasoby > div { margin-top:0 !important; padding-top:0 !important; }
html.compact-supplies #tab-zasoby > div > div:first-child { gap:6px !important; margin-bottom:6px !important; }
html.compact-supplies .supplies-desktop-cols, html.compact-supplies .supply-column, html.compact-supplies .supply-col-cards { gap:6px !important; }
html.compact-supplies .supply-col-header { margin:0 !important; }
html.compact-supplies .supplies-mobile-view > div:first-child { gap:6px !important; margin-bottom:6px !important; }
html.compact-supplies .supplies-mobile-view .supplies-grid { gap:6px !important; }
@media (max-width:600px) { html.compact-supplies header { gap:6px !important; } html.compact-supplies #header-row2 { gap:6px !important; } html.compact-supplies #tab-zasoby > div > div:first-child { gap:6px !important; } }
html.compact-supplies header .compact-statuses { gap:6px !important; }
html.compact-supplies header { padding-bottom:0 !important; }
html.compact-supplies header .logo { row-gap:6px !important; }
@media (min-width:601px) { html.compact-supplies header .logo { margin-bottom:-1px !important; } }
/* Zásoby (PC): tři sloupce podle druhu, úsporné karty, barevná tlačítka, pevná písma, mezery 6 px. Telefon beze změny. */
@media (min-width:601px) {
  html.compact-supplies .cs-heading { display:none !important; }
  html.compact-supplies header { gap:6px !important; }
  html.compact-supplies #header-row2 .header-left-group { grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:6px !important; }   /* 4 dlaždice (Skenovat odebráno 31. 10. 2026 – je ve formuláři Přidat) */
  html.compact-supplies #header-row2 :is(#add-supply-btn,#supply-dosage-btn,#supply-scan-btn,#supply-sort-wrap > button,#global-search-btn,#supply-export-btn) { background:linear-gradient(135deg, rgba(var(--t),.20), rgba(var(--t),.06)) !important; border:1px solid rgba(var(--t),.55) !important; color:rgb(var(--td)) !important; box-shadow:none !important; }
  html.compact-supplies #header-row2 #add-supply-btn { --t:70,190,140; --td:18,110,76; }
  html.compact-supplies #header-row2 #supply-dosage-btn, html.compact-supplies #header-row2 #supply-scan-btn { --t:90,150,230; --td:30,80,170; }
  html.compact-supplies #header-row2 #supply-sort-wrap > button { --t:116,198,157; --td:45,106,79; }
  html.compact-supplies #header-row2 #global-search-btn { --t:240,120,160; --td:170,40,90; }
  html.compact-supplies #header-row2 #supply-export-btn { --t:235,180,60; --td:140,95,10; }
  html.compact-supplies #tab-zasoby > div { padding-top:6px !important; padding-bottom:80px !important; }
  html.compact-supplies #tab-zasoby > div > div:first-child { gap:6px !important; margin-bottom:6px !important; }
  html.compact-supplies #tab-zasoby .supplies-desktop-cols { gap:6px !important; }
  html.compact-supplies #tab-zasoby .supply-column { gap:6px !important; }
  html.compact-supplies #tab-zasoby .supply-col-cards { gap:6px !important; }
  html.compact-supplies #tab-zasoby .supply-col-header { padding:0 8px !important; height:32px; border-radius:6px !important; display:flex !important; align-items:center; justify-content:space-between; margin:0 !important; }
  html.compact-supplies #tab-zasoby .supply-col-header > div { font-size:13px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card { height:62px; padding:6px !important; gap:6px !important; border-radius:6px !important; margin:0 !important; overflow:hidden; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child { display:flex !important; flex-direction:column; justify-content:center; gap:2px; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(1) { font-size:13px !important; line-height:18px !important; margin:0 !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(2) { display:block !important; font-size:11px !important; line-height:16px !important; margin:0 !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(2) > * { display:inline !important; font-size:11px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(n+3) { display:none !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:last-child { gap:6px !important; flex-direction:column; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:last-child > span { width:72px !important; height:24px !important; font-size:11px !important; border-radius:6px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:last-child > button { width:72px !important; height:24px !important; min-height:0 !important; padding:0 !important; font-size:12px !important; border-radius:6px !important; }
}
@media (min-width:601px) {
  html.compact-supplies #header-row2 { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; align-items:center; }   /* 4 dlaždice bez Skenovat (31. 10. 2026) */
  html.compact-supplies #header-row2 .header-left-group { display:contents !important; }
  html.compact-supplies #header-row2 #supply-export-btn { width:100% !important; max-width:none !important; height:44px !important; min-width:0 !important; }
  html.compact-supplies #tab-zasoby .supply-item-card { height:62px !important; min-height:0 !important; max-height:62px; }
}
/* Zásoby (PC): tabulka, jeden řádek na položku. */
@media (min-width:601px) {
  html.compact-supplies #tab-zasoby .cp-tab ~ .supplies-desktop-cols { display:none !important; }
  html.compact-supplies .cp-tab { border:1.5px solid var(--pearl-edge); border-radius:6px; background:var(--pearl-face); box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow); overflow:hidden; }
  html.compact-supplies .cp-row { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr) 160px; gap:6px; align-items:center; padding:0 6px; height:44px; border-top:1px solid var(--pearl-edge); box-sizing:border-box; }
  html.compact-supplies .cp-row:first-child { border-top:0; }
  html.compact-supplies .cp-head { height:30px; background:rgba(116,198,157,.10); font-size:11px; font-weight:800; text-transform:uppercase; color:var(--text2); }
  html.compact-supplies .cp-ic { width:28px; height:28px; border-radius:6px; background:var(--surface2); display:flex; align-items:center; justify-content:center; font-size:15px; }
  html.compact-supplies .cp-name { font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
  html.compact-supplies .cp-qty { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  html.compact-supplies .cp-exp { font-size:13px; color:var(--text2); white-space:nowrap; }
  html.compact-supplies .cp-sts { display:flex; gap:4px; min-width:0; }
  html.compact-supplies .cp-st { height:24px; padding:0 8px; border:1px solid; border-radius:6px; font-size:11px; font-weight:700; display:flex; align-items:center; white-space:nowrap; }
  html.compact-supplies .cp-stock { background:#e8f5ea; color:#1f6a35; border-color:#a9d6b4; }
  html.compact-supplies .cp-low, html.compact-supplies .cp-expiring { background:#fdf1dc; color:#8c5f0a; border-color:#ecc88a; }
  html.compact-supplies .cp-expired, html.compact-supplies .cp-invalid { background:#fde8ec; color:#a5243c; border-color:#f0a7b4; }
  html.compact-supplies .cp-act { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  html.compact-supplies .cp-btn { height:28px; padding:0; border:1px solid var(--pearl-edge); border-radius:6px; background:var(--surface2); color:var(--accent); font:700 12px/1 'IBM Plex Sans',sans-serif; cursor:pointer; }
}
@media (min-width:601px) {
  html.compact-supplies .cp-bad { background:linear-gradient(90deg,rgba(214,58,84,.12),rgba(214,58,84,.03)); box-shadow:inset 4px 0 0 #d63a54; }
  html.compact-supplies .cp-warn { background:linear-gradient(90deg,rgba(224,160,32,.14),rgba(224,160,32,.03)); box-shadow:inset 4px 0 0 #e0a020; }
  html.compact-supplies .cp-row[hidden] { display:none !important; }
  html.compact-supplies .cp-prah { font-weight:600; color:var(--text2); font-size:11px; margin-left:6px; }
  html.compact-supplies .cp-dlazdice { cursor:pointer; }
  html.compact-supplies .cp-dlazdice.cp-aktivni { box-shadow:inset 0 -3px 0 var(--accent) !important; background:#e6fcf3 !important; }
}
@media (min-width:601px) { html.compact-supplies.compact-supplies #tab-zasoby .cp-dlazdice.cp-aktivni { box-shadow:inset 0 -4px 0 #2D6A4F !important; background-color:#e6fcf3 !important; background-image:none !important; } }
/* Každý řádek je samostatná jemná dlaždice (mezera 6 px), ne jedna tabulka v rámečku. */
@media (min-width:601px) {
  html.compact-supplies .cp-tab { display:flex; flex-direction:column; gap:6px; border:0; background:none; box-shadow:none; overflow:visible; }
  html.compact-supplies .cp-row:not(.cp-head) { border:1.5px solid var(--pearl-edge); border-radius:6px; background:var(--pearl-face); box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow); }
  html.compact-supplies .cp-row:not(.cp-head):first-child { border-top:1.5px solid var(--pearl-edge); }
  html.compact-supplies .cp-head { height:20px; background:none; border:0; padding:0 8px; }
  html.compact-supplies .cp-row.cp-bad { background:linear-gradient(90deg,rgba(214,58,84,.12),rgba(214,58,84,.03)); box-shadow:inset 4px 0 0 #d63a54; border-color:rgba(214,58,84,.45); }
  html.compact-supplies .cp-row.cp-warn { background:linear-gradient(90deg,rgba(224,160,32,.14),rgba(224,160,32,.03)); box-shadow:inset 4px 0 0 #e0a020; border-color:rgba(224,160,32,.5); }
}
/* Bez barevného proužku vlevo u varovných řádků (zůstává jen jemný nádech a rámeček). */
@media (min-width:601px) {
  html.compact-supplies .cp-row.cp-bad, html.compact-supplies .cp-row.cp-warn, html.compact-supplies .cp-bad, html.compact-supplies .cp-warn { box-shadow:inset 1px 1px 0 var(--pearl-light), inset -1px -1px 0 var(--pearl-shade), 0 2px 5px var(--pearl-shadow) !important; }
}
/* Bez zobrazeného minima v tabulce (je v detailu položky). */
html.compact-supplies .cp-prah { display:none !important; }
/* Zásoby (PC): mezery mezi bloky přesně 6 px. */
@media (min-width:601px) {
  html.compact-supplies #tab-zasoby > div { padding-top:0 !important; }
  html.compact-supplies header { margin-bottom:6px !important; }
}
@media (min-width:601px) { html.compact-supplies #header-row2 { margin-top:1px; } }
/* Zásoby (telefon): bez nadpisu, barevná tlačítka, všechny mezery 6 px. */
html.compact-supplies #header-row2 :is(#add-supply-btn,#supply-dosage-btn,#supply-scan-btn,#supply-sort-wrap > button,#global-search-btn,#supply-export-btn) { background:linear-gradient(135deg, rgba(var(--t),.20), rgba(var(--t),.06)) !important; border:1px solid rgba(var(--t),.55) !important; color:rgb(var(--td)) !important; box-shadow:none !important; }
@media (max-width:600px) {
  html.compact-supplies .cs-heading { display:none !important; }
  html.compact-supplies header { gap:6px !important; margin-bottom:6px !important; }
  html.compact-supplies #header-row2 .header-left-group { gap:6px !important; }
  html.compact-supplies #tab-zasoby > div { padding-top:0 !important; padding-bottom:90px !important; }
  html.compact-supplies #tab-zasoby > div > div:first-child { gap:6px !important; margin-bottom:6px !important; }
  html.compact-supplies #tab-zasoby .supplies-mobile-view > div:first-child { gap:6px !important; margin-bottom:6px !important; }
  html.compact-supplies #tab-zasoby .supplies-grid { gap:6px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card { padding:6px 8px !important; margin:0 !important; gap:6px !important; border-radius:6px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(1) { margin-bottom:2px !important; font-size:14px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:first-child > div:nth-child(2) { margin-bottom:2px !important; font-size:12px !important; }
  html.compact-supplies #tab-zasoby .supply-item-card > div:last-child { gap:6px !important; }
}
html.compact-supplies #header-row2 #add-supply-btn { --t:70,190,140; --td:18,110,76; }
html.compact-supplies #header-row2 #supply-dosage-btn, html.compact-supplies #header-row2 #supply-scan-btn { --t:90,150,230; --td:30,80,170; }
html.compact-supplies #header-row2 #supply-sort-wrap > button { --t:116,198,157; --td:45,106,79; }
html.compact-supplies #header-row2 #global-search-btn { --t:240,120,160; --td:170,40,90; }
html.compact-supplies #header-row2 #supply-export-btn { --t:235,180,60; --td:140,95,10; }

/* PC tabulka: číslo doprava, jednotka vedle (číslice i jednotky přesně pod sebou). */
html.compact-supplies .cp-qty:has(.cp-qn) { display:grid; grid-template-columns:1.6em calc(var(--cp-qn-w,2ch) * 1.2) minmax(0,1fr); column-gap:3px; align-items:center; }
html.compact-supplies .cp-qn { text-align:right; font-variant-numeric:tabular-nums; }

/* Telefon: stejné sloupce jako PC (ikona, číslo doprava, jednotka, expirace), vše pod sebou i mezi kartami. */
@media (max-width:600px) {
  html.compact-supplies .cp-tel-row { display:grid !important; grid-template-columns:1.6em calc(var(--cp-qn-w,2ch) * 1.2) 2.1em minmax(0,1fr); column-gap:3px; align-items:baseline; }
  html.compact-supplies .cp-tel-row .cp-tel-qty { display:contents !important; }
  html.compact-supplies .cp-tel-row .cp-qn { text-align:right; font-variant-numeric:tabular-nums; font-weight:700; color:var(--text); }
  html.compact-supplies .cp-tel-row .cp-qi, html.compact-supplies .cp-tel-row .cp-qu { font-weight:700; color:var(--text); }
  html.compact-supplies .cp-tel-row .cp-exp { color:var(--text2); white-space:nowrap; }
}

/* Telefon: stavové štítky stejné jako na PC (všechny stavy vedle sebe). */
@media (max-width:600px) {
  html.compact-supplies .supply-item-card .cp-sts { display:flex; gap:4px; min-width:0; justify-content:center; }
  html.compact-supplies .supply-item-card .cp-st { height:26px; padding:0 8px; border:1px solid; border-radius:8px; font-size:11px; font-weight:700; display:flex; align-items:center; white-space:nowrap; }
  html.compact-supplies .supply-item-card .cp-stock { background:#e8f5ea; color:#1f6a35; border-color:#a9d6b4; }
  html.compact-supplies .supply-item-card .cp-low, html.compact-supplies .supply-item-card .cp-expiring { background:#fdf1dc; color:#8c5f0a; border-color:#ecc88a; }
  html.compact-supplies .supply-item-card .cp-expired, html.compact-supplies .supply-item-card .cp-invalid { background:#fde8ec; color:#a5243c; border-color:#f0a7b4; }
}

/* Telefon: pravý sloupec karty zarovnaný doprava, tlačítka vždy na stejném místě. */
@media (max-width:600px) { html.compact-supplies .supply-item-card > div:last-child { align-items:flex-end !important; } }

/* Text vždy přesně uprostřed, ikona stojí vedle něj a text neovlivňuje (PC i telefon). */
html.compact-supplies #header-row2 :is(#supply-dosage-btn,#supply-scan-btn,#global-search-btn,#supply-export-btn,#supply-sort-btn) { display:grid !important; grid-template-columns:1fr auto 1fr !important; column-gap:6px !important; align-items:center; justify-items:center; }
html.compact-supplies #header-row2 :is(#supply-dosage-btn,#supply-scan-btn,#global-search-btn,#supply-export-btn) > span:first-child { grid-column:1; justify-self:end; }
html.compact-supplies #header-row2 :is(#supply-dosage-btn,#supply-scan-btn,#global-search-btn,#supply-export-btn) > span:nth-child(2) { grid-column:2; margin-left:0 !important; }
html.compact-supplies #header-row2 #supply-sort-label { grid-column:2; }
html.compact-supplies #header-row2 #supply-sort-btn > span:last-child { grid-column:3; justify-self:start; }
html.compact-supplies .supply-top-stat-lbl.cp-ico-lbl { display:grid; grid-template-columns:1fr auto 1fr; column-gap:4px; align-items:center; }
html.compact-supplies .supply-top-stat-lbl .cp-ico { grid-column:1; justify-self:end; }
html.compact-supplies .supply-top-stat-lbl .cp-txt { grid-column:2; }

/* Telefon: bez dlaždic typů (na PC nejsou), nízká karta: název + stavy, pod tím množství/expirace + Detail + Koupit. */
@media (max-width:600px) {
  html.compact-supplies .supplies-mobile-view > div:first-child { display:none !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card { display:grid !important; grid-template-columns:minmax(0,1fr) auto auto !important; column-gap:6px !important; row-gap:6px !important; align-items:center !important; padding:8px 10px !important; min-height:0 !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card > div { display:contents !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card > div:first-child > div:first-child { grid-column:1; grid-row:1; margin:0 !important; font-size:15px !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card .cp-sts { grid-column:2 / 4; grid-row:1; justify-self:end; }
  html.compact-supplies .supplies-mobile-view .supply-item-card .cp-tel-row { grid-column:1; grid-row:2; margin:0 !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card button { grid-row:2; }
  html.compact-supplies .supplies-mobile-view .supply-item-card button:nth-of-type(1) { grid-column:2; }
  html.compact-supplies .supplies-mobile-view .supply-item-card button:nth-of-type(2) { grid-column:3; }
}

/* Telefon: stejné velikosti písma řádku jako na PC (množství 14 px, expirace 13 px). */
@media (max-width:600px) {
  html.compact-supplies .supply-item-card .cp-tel-row .cp-qi, html.compact-supplies .supply-item-card .cp-tel-row .cp-qn, html.compact-supplies .supply-item-card .cp-tel-row .cp-qu { font-size:14px !important; }
  html.compact-supplies .supply-item-card .cp-tel-row .cp-exp { font-size:13px !important; font-weight:400 !important; }
}
@media (max-width:600px) { html.compact-supplies .supply-item-card .cp-tel-row { font-size:14px !important; } }

/* Všechny mezery 6 px: mezi štítky, mezi tlačítky, mezi sloupci i vpravo; sloupce Stav a Akce přesně na dva prvky. */
@media (min-width:601px) {
  html.compact-supplies .cp-row { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) calc(var(--cp-w,72px)*2 + 6px) calc(var(--cp-w,72px)*2 + 6px) !important; column-gap:6px !important; }
  html.compact-supplies .cp-sts { gap:6px !important; }
  html.compact-supplies .cp-act { display:flex !important; gap:6px !important; justify-content:flex-end; }
}
@media (max-width:600px) {
  html.compact-supplies .supply-item-card .cp-sts { gap:6px !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card { padding:6px !important; }
}

/* Zásoby: všechny mezery 4 px (PC i telefon). */
html.compact-supplies header { gap:4px !important; margin-bottom:4px !important; }
html.compact-supplies .logo, html.compact-supplies .logo:has(#stanice-logo:not([style*="hidden"])), html.compact-preview.compact-supplies header .logo, html.compact-preview.compact-supplies header .logo:has(#stanice-logo:not([style*="hidden"])) { gap:4px !important; column-gap:4px !important; row-gap:4px !important; }
html.compact-supplies .compact-statuses { gap:4px !important; }
html.compact-supplies #header-row2, html.compact-supplies #header-row2 .header-left-group { gap:4px !important; }
html.compact-supplies #tab-zasoby > div { gap:4px !important; }
html.compact-supplies #tab-zasoby > div > div:first-child { gap:4px !important; margin-bottom:4px !important; }
html.compact-supplies .cs-overview { gap:4px !important; margin-bottom:4px !important; }
html.compact-supplies .cp-tab { gap:4px !important; row-gap:4px !important; }
@media (min-width:601px) {
  html.compact-supplies .cp-row { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) calc(var(--cp-w,72px)*2 + 4px) calc(var(--cp-w,72px)*2 + 4px) !important; column-gap:4px !important; }
  html.compact-supplies .cp-sts, html.compact-supplies .cp-act { gap:4px !important; }
  html.compact-supplies .cp-qty:has(.cp-qn) { column-gap:4px !important; }
}
@media (max-width:600px) {
  html.compact-supplies .supply-item-card .cp-sts { gap:4px !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card { padding:4px !important; column-gap:4px !important; row-gap:4px !important; }
  html.compact-supplies .supplies-mobile-view .supply-item-card .cp-tel-row { column-gap:4px !important; }
  html.compact-supplies .supplies-mobile-view .supplies-grid, html.compact-supplies .supply-col-cards { gap:4px !important; }
}
html.compact-supplies #tab-zasoby .supplies-grid { gap:4px !important; row-gap:4px !important; }

/* Zásoby: písmo podle společného měřítka --ts. */
@media (min-width:601px) {
  html.compact-supplies .cp-head { font-size:calc(11px * var(--ts)) !important; height:calc(20px * var(--ts)) !important; }
  html.compact-supplies .cp-row:not(.cp-head) { height:calc(44px * var(--ts)) !important; }
  html.compact-supplies .cp-name, html.compact-supplies .cp-qty { font-size:calc(14px * var(--ts)) !important; }
  html.compact-supplies .cp-exp { font-size:calc(13px * var(--ts)) !important; }
}
html.compact-supplies .cp-dlazdice > div:first-child { font-size:calc(20px * var(--ts)) !important; line-height:1.15 !important; }
html.compact-supplies .supply-top-stat-lbl { font-size:calc(11px * var(--ts)) !important; }
@media (max-width:600px) {
  html.compact-supplies .supplies-mobile-view .supply-item-card > div:first-child > div:first-child { font-size:calc(14px * var(--ts)) !important; }
  html.compact-supplies .supply-item-card .cp-tel-row, html.compact-supplies .supply-item-card .cp-tel-row .cp-qi, html.compact-supplies .supply-item-card .cp-tel-row .cp-qn, html.compact-supplies .supply-item-card .cp-tel-row .cp-qu { font-size:calc(14px * var(--ts)) !important; }
  html.compact-supplies .supply-item-card .cp-tel-row .cp-exp { font-size:calc(13px * var(--ts)) !important; }
}
@media (max-width:600px) { html.compact-supplies #tab-zasoby .supplies-mobile-view .supply-item-card > div:first-child > div:nth-child(1) { font-size:calc(14px * var(--ts)) !important; } }
@media (max-width:600px) { html.compact-supplies #tab-zasoby .supplies-mobile-view .supply-item-card > div:first-child > div:nth-child(2) { font-size:calc(14px * var(--ts)) !important; } }
/* Extra velké písmo na telefonu: tlačítka na vlastním řádku, aby se vešlo množství i expirace. */
@media (max-width:600px) {
  html.compact-supplies.font-xlarge .supplies-mobile-view .supply-item-card .cp-tel-row { grid-column:1 / 4 !important; }
  html.compact-supplies.font-xlarge .supplies-mobile-view .supply-item-card button { grid-row:3 !important; }
}

/* Telefon: karta skrytá filtrem dlaždic (Dochází / Do 30 dnů) se opravdu skryje */
html.compact-supplies #tab-zasoby .supplies-mobile-view .supply-item-card[hidden] { display:none !important; }

/* Ostré linky ve Zásobách: plný rámeček 1 px (Petr 21. 10. 2026) */
html.compact-supplies { --zs-edge: #8ae6c0; }
html.compact-supplies :is(#header-row2 #add-supply-btn, #header-row2 #supply-dosage-btn,#supply-scan-btn, #supply-sort-wrap > button, #header-row2 #global-search-btn, #header-row2 #supply-export-btn) { border-width:1px !important; }
html.compact-supplies :is(#tab-zasoby > div > div:first-child > div, .supply-col-header, .supply-col-cards > div) { border-width:1px !important; }
/* Telefon: sloupec jednotky je dost široký na „konzerv“ / „kapsiček“, expirace se s ním už nepřekrývá */
@media (max-width:600px) {
  html.compact-supplies .cp-tel-row { grid-template-columns:1.2em calc(var(--cp-qn-w,2ch) * 1.05) 4.3em minmax(0,1fr) !important; column-gap:2px !important; }
  html.compact-supplies .cp-tel-row .cp-exp { font-size:12px !important; white-space:nowrap; }
  html.compact-supplies .cp-tel-row .cp-qu { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* Zásoby – návrh 1 (26. 10. 2026): jeden seznam pro PC, tablet i telefon, nic se neusekne, tlačítka 44 px */
html.compact-supplies #tab-zasoby .zs-list ~ .supplies-desktop-cols, html.compact-supplies #tab-zasoby .zs-list ~ .supplies-mobile-view { display:none !important; }
html.compact-supplies .zs-list { --zs-l:#cdf3e2; --zs-ok-b:#e8f5ea; --zs-ok-l:#a9d6b4; --zs-ok-t:#1f6a35; --zs-w-b:#fdf1dc; --zs-w-l:#ecc88a; --zs-w-t:#8c5f0a; --zs-b-b:#fde8ec; --zs-b-l:#f0a7b4; --zs-b-t:#a5243c; --zs-bt-b:#f2fef9; --zs-bt-l:#b8efd7; --zs-bt-t:#34c47f; --zs-buy:#e4fdf2; --zs-ic:#5cc496; --zs-row-b:#fff8f9; --zs-row-w:#fffbf3;
  display:flex; flex-direction:column; gap:6px; font-size:calc(14px * var(--fs-scale, 1)); color:var(--text); margin-top:6px; }
html.dark.compact-supplies .zs-list { --zs-l:#3f7457; --zs-ok-b:#261638; --zs-ok-l:#ae86dc; --zs-ok-t:#ae86dc; --zs-w-b:#3b3210; --zs-w-l:#f0d36a; --zs-w-t:#f0d36a; --zs-b-b:#3d1a2a; --zs-b-l:#f2a0c0; --zs-b-t:#f2a0c0; --zs-bt-b:#1f4a35; --zs-bt-l:#7fc8a1; --zs-bt-t:#a8ffd7; --zs-buy:#316046; --zs-ic:#a8ffd7; --zs-row-b:#2a1820; --zs-row-w:#2a2412; }
html.compact-supplies .zs-list * { box-sizing:border-box; }
html.compact-supplies .zs-head, html.compact-supplies .zs-row { display:grid; grid-template-columns:minmax(0,1fr) 8em 8em 13em 15em; gap:10px; align-items:center; padding:6px 10px; }
html.compact-supplies .zs-head { padding-top:0; padding-bottom:0; font-weight:800; text-transform:uppercase; color:var(--text2); }
html.compact-supplies .zs-head > span { font-size:.8em; }
html.compact-supplies .zs-head > span:nth-child(4) { text-align:center; }
html.compact-supplies .zs-row { min-height:58px; border:1px solid var(--zs-l); border-radius:6px; background:var(--surface); cursor:pointer; }
html.compact-supplies .zs-row[hidden] { display:none !important; }
html.compact-supplies .zs-row.zs-bad { border-color:var(--zs-b-l); background:var(--zs-row-b); }
html.compact-supplies .zs-row.zs-warn { border-color:var(--zs-w-l); background:var(--zs-row-w); }
html.compact-supplies .zs-name { font-weight:800; line-height:1.25; overflow-wrap:anywhere; min-width:0; }
html.compact-supplies .zs-qty { font-weight:700; white-space:nowrap; display:flex; align-items:center; }
html.compact-supplies .zs-exp { color:var(--text2); white-space:nowrap; }
html.compact-supplies .zs-ic { display:inline-flex; width:1.3em; height:1.3em; margin-right:.35em; flex:none; }
html.compact-supplies .zs-ic svg { width:100%; height:100%; fill:none; stroke:var(--zs-ic); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
html.compact-supplies .zs-sts { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; min-width:0; }
html.compact-supplies .zs-st { display:inline-flex; align-items:center; justify-content:center; text-align:center; min-height:28px; padding:3px 10px; border:1px solid; border-radius:6px; font-weight:700; font-size:.86em; line-height:1.15; overflow-wrap:anywhere; }
html.compact-supplies .zs-ok { background:var(--zs-ok-b); border-color:var(--zs-ok-l); color:var(--zs-ok-t); }
html.compact-supplies .zs-warn.zs-st { background:var(--zs-w-b); border-color:var(--zs-w-l); color:var(--zs-w-t); }
html.compact-supplies .zs-bad.zs-st { background:var(--zs-b-b); border-color:var(--zs-b-l); color:var(--zs-b-t); }
html.compact-supplies .zs-act { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
html.compact-supplies .zs-btn { min-height:44px; min-width:0; padding:4px 8px; border:1px solid var(--zs-bt-l); border-radius:6px; background:var(--zs-bt-b); color:var(--zs-bt-t); font-family:inherit; font-size:1em; font-weight:700; line-height:1.15; text-align:center; overflow-wrap:anywhere; cursor:pointer; box-shadow:none; }
html.compact-supplies .zs-btn.zs-buy { background:var(--zs-buy); }
@media (max-width:1100px) {
  html.compact-supplies .zs-head { display:none; }
  html.compact-supplies .zs-row { grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"n s" "q e" "a a"; row-gap:8px; }
  html.compact-supplies .zs-name { grid-area:n; }
  html.compact-supplies .zs-sts { grid-area:s; justify-content:flex-end; max-width:60vw; }
  html.compact-supplies .zs-qty { grid-area:q; }
  html.compact-supplies .zs-exp { grid-area:e; text-align:right; }
  html.compact-supplies .zs-act { grid-area:a; }
}
/* Dlaždice nahoře (26. 10. 2026): na úzkém telefonu s velkým písmem se popisek zalomí, dřív lezl přes okraj (320–360 px, 12 jazyků) */
@media (max-width:600px) {
  html.compact-supplies .supply-top-stat-lbl.cp-ico-lbl { grid-template-columns:minmax(0,1fr); row-gap:2px; justify-items:center; height:auto !important; line-height:1.15 !important; }
  html.compact-supplies .supply-top-stat-lbl .cp-ico, html.compact-supplies .supply-top-stat-lbl .cp-txt { grid-column:1; justify-self:center; }
}
html.compact-supplies .supply-top-stat-lbl .cp-txt { white-space:normal !important; text-align:center; min-width:0; overflow-wrap:anywhere; line-height:1.15; }

/* Psi: tlačítko Skenovat v liště Zásob (návrh 2 pro počítač, Petr 30. 10. 2026) a čtyři tlačítka v řadě na telefonu (návrh 3) */
html.compact-supplies #header-row2 #supply-scan-btn { order:6; }
@media (min-width:1101px) {
  html.compact-supplies #header-row2 .header-left-group { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
  html.compact-supplies #header-row2 #add-supply-btn { order:1 !important; }
  html.compact-supplies #header-row2 #supply-sort-wrap { order:2 !important; }
  html.compact-supplies #header-row2 #global-search-btn { order:3 !important; }
  html.compact-supplies #header-row2 #supply-export-btn { order:4 !important; }
  html.compact-supplies #header-row2 #supply-scan-btn { order:5 !important; }
}
@media (max-width:600px) {
  html.compact-supplies #supply-scan-btn { display:none !important; }
  html.compact-supplies #header-row2{display:block!important}
  html.compact-supplies #header-row2 .header-left-group{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;grid-column:1/-1;width:100%}
  html.compact-supplies #header-row2 .header-left-group>*, html.compact-supplies #header-row2 .header-left-group>#supply-sort-wrap{grid-column:auto!important;grid-row:auto!important;width:auto!important;max-width:none!important;min-width:0!important;font-size:12px!important;padding:0 2px!important}
  html.compact-supplies #header-row2 .header-left-group>#supply-sort-wrap>*{width:100%!important}
  html.compact-supplies #header-row2 #add-supply-btn{order:1!important}
  html.compact-supplies #header-row2 #supply-sort-wrap{order:2!important}
  html.compact-supplies #header-row2 #global-search-btn{order:3!important}
  html.compact-supplies #header-row2 #supply-export-btn{order:4!important}
  html.compact-supplies #supply-export-btn [data-lang="btn_export"]::after{content:""!important}
  html.compact-supplies #header-row2 .header-left-group>*{white-space:nowrap!important}
}
