/* Create Your Supplement – appka */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations'), url(fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'), url(fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F3F6F4;
  --white: #FFFFFF;
  --ink: #132327;
  --muted: #56676A;
  --line: #C8D3CF;
  --green: #0B5D4B;
  --green-hi: #0A7560;
  --mint: #DCEFE6;
  --amber: #7E520A;
  --amber-bg: #FAF0DC;
  --red: #A02D24;
  --red-bg: #FBE9E6;
  --r: 6px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; font-stretch: 100%; }
a { color: var(--green); text-underline-offset: .15em; }
a:hover { color: var(--green-hi); }
:focus-visible { outline: 3px solid var(--green-hi); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.loading { padding: 3rem 1.5rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }

/* hlavička */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--white); flex-wrap: wrap; }
.mark { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: .6rem; }
.mark-name { font-weight: 850; font-stretch: 125%; font-size: 1.05rem; letter-spacing: -.01em; }
.mark-by { font-size: .78rem; color: var(--muted); font-stretch: 85%; }
.nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 550; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--green); }
.nav a:hover { color: var(--green); }
.nav .lang { width: auto; } .lang { font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: var(--r); padding: .25rem .4rem; background: var(--white); color: var(--ink); }

/* tlačidlá a polia */
.btn { font: inherit; font-weight: 650; border: 1.5px solid transparent; border-radius: var(--r); padding: .6rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; line-height: 1.2; }
.btn.primary { background: var(--green); color: var(--white); }
.btn.primary:hover:not(:disabled) { background: var(--green-hi); color: var(--white); }
.btn.ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn.danger { background: var(--red); color: var(--white); }
.btn.add { background: var(--mint); color: var(--green); border-color: transparent; }
.btn.add:hover { background: var(--green); color: var(--white); }
.btn.sm { padding: .3rem .65rem; font-size: .88rem; }
.btn.big { padding: .9rem 1.6rem; font-size: 1.1rem; font-stretch: 110%; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.busy { cursor: progress; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--green); cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.linkbtn.sm { font-size: .85rem; }
.field { display: block; margin-bottom: 1rem; }
.field-l { display: block; font-weight: 650; font-size: .92rem; margin-bottom: .3rem; }
.field-h { display: block; font-size: .82rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r); padding: .55rem .7rem; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--mint); }
select.auto { width: auto; min-width: 16rem; }
input[readonly] { background: var(--paper); }
textarea { resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0; font-size: .95rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .18rem; accent-color: var(--green); flex: none; }
.form-err { color: var(--red); font-weight: 600; min-height: 1.2em; font-size: .92rem; }
.form-err:empty { min-height: 0; margin: 0; }
.note { background: var(--mint); padding: .6rem .8rem; border-radius: var(--r); font-size: .92rem; }

/* prihlásenie */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 58px); }
.auth-side { background: var(--green); color: var(--paper); padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: flex-end; }
.auth-word { font-size: clamp(3rem, 7.5vw, 6.5rem); font-weight: 900; font-stretch: 125%; line-height: .92; letter-spacing: -.03em; margin: 0 0 2rem; }
.auth-lead { font-size: 1.15rem; max-width: 30em; color: var(--mint); margin: 0; }
.auth-form { padding: clamp(2rem, 5vw, 4rem); max-width: 31rem; width: 100%; align-self: center; }
.auth-links { font-size: .95rem; margin: .8rem 0 0; }
.done { padding: 1rem 0; }

/* stránky */
.page { padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.5rem); max-width: 76rem; margin: 0 auto; }
.page.narrow { max-width: 40rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.block { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.block .tbl { margin-top: 1rem; }
.danger-zone { border-color: var(--red); }
.danger-zone h2 { color: var(--red); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: .4rem; }
.empty { background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--r); padding: clamp(2rem, 5vw, 4rem); text-align: left; max-width: 44rem; }
.empty h2 { font-size: 1.5rem; font-stretch: 112%; }
.empty p { max-width: 34em; color: var(--muted); margin-bottom: 1.5rem; }

/* tabuľky */
.tbl { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { font-size: .82rem; font-weight: 650; color: var(--muted); background: var(--paper); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nm a { font-weight: 650; color: var(--ink); }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .acts .btn + .btn { margin-left: .4rem; }
.status { display: inline-block; font-size: .8rem; font-weight: 650; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.st-draft { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.st-ziadost_o_cenu { background: var(--amber-bg); color: var(--amber); }
.st-nacenena { background: var(--green); color: var(--white); }
.toggle { font: inherit; font-size: .82rem; font-weight: 650; border-radius: 999px; padding: .2rem .7rem; border: 1.5px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; }
.toggle.on { background: var(--mint); border-color: var(--green); color: var(--green); }
.toggle:disabled { cursor: not-allowed; opacity: .6; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.inline-form input[type=email] { flex: 2 1 14rem; width: auto; }
.inline-form input[type=text] { flex: 1 1 10rem; width: auto; }
.inline-form .check { margin: 0; }

/* dialóg */
.modal { border: 0; border-radius: 10px; padding: 0; max-width: min(36rem, 94vw); width: 100%; color: var(--ink); box-shadow: 0 20px 60px rgba(19, 35, 39, .3); }
.modal::backdrop { background: rgba(19, 35, 39, .45); }
.modal-in { padding: 1.5rem; }
.modal-act { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.forms { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.form-tile { position: relative; border: 1.5px solid var(--line); border-radius: var(--r); padding: .9rem .5rem .7rem; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .45rem; background: var(--white); }
.form-tile input { position: absolute; opacity: 0; pointer-events: none; }
.form-tile:has(input:checked) { border-color: var(--green); background: var(--mint); }
.form-tile:has(input:focus-visible) { outline: 3px solid var(--green-hi); outline-offset: 2px; }
.form-tile.off { cursor: not-allowed; color: var(--muted); background: var(--paper); }
.form-n { font-weight: 700; }
.form-sub { font-size: .72rem; line-height: 1.25; }
.form-ico { width: 44px; height: 30px; position: relative; display: block; }
.ico-capsule::before { content: ''; position: absolute; inset: 7px 0; border-radius: 99px; background: linear-gradient(90deg, var(--green) 50%, var(--mint) 50%); border: 2px solid var(--green); }
.ico-tablet::before { content: ''; position: absolute; left: 8px; top: 1px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--green); background: var(--white); }
.ico-tablet::after { content: ''; position: absolute; left: 21px; top: 6px; width: 2px; height: 18px; background: var(--green); }
.ico-powder::before { content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 16px; border-radius: 50% 50% 4px 4px / 100% 100% 4px 4px; background: var(--green); }
.ico-liquid::before { content: ''; position: absolute; left: 12px; top: 2px; width: 20px; height: 20px; border-radius: 0 50% 50% 50%; transform: rotate(45deg); background: var(--green); opacity: .5; }

/* editor */
.editor { padding: 1rem clamp(1rem, 2.5vw, 2rem) 3rem; max-width: 96rem; margin: 0 auto; }
.ed-head { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1.5rem; align-items: end; margin-bottom: 1rem; }
.back { grid-column: 1 / -1; font-size: .9rem; text-decoration: none; }
.ed-title { min-width: 0; }
.ed-name { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; margin: 0; border: 1.5px solid transparent; background: transparent; padding: .1rem .3rem; margin-left: -.3rem; width: 100%; }
input.ed-name:hover { border-color: var(--line); }
input.ed-name:focus { border-color: var(--green); background: var(--white); }
.ed-meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: .35rem; }
.ed-form { width: auto; padding: .2rem .5rem; font-size: .9rem; }
.ed-form-ro { font-weight: 650; }
.savestate { font-size: .85rem; color: var(--muted); }
.savestate .bad { color: var(--red); font-weight: 650; }
.ed-actions { display: flex; gap: .6rem; }
.banner { background: var(--amber-bg); color: var(--amber); padding: .75rem 1rem; border-radius: var(--r); font-weight: 550; }

.offers { background: var(--white); border: 2px solid var(--green); border-radius: var(--r); padding: 1.1rem 1.4rem; margin-bottom: 1.25rem; }
.offer-price { font-size: 1.6rem; font-weight: 850; font-stretch: 112%; margin: 0 0 .2rem; font-variant-numeric: tabular-nums; }
.offer.old { opacity: .55; border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
.offer.old .offer-price { font-size: 1.1rem; }
.offer-valid { color: var(--muted); margin-bottom: .3rem; }
.offer-contact { margin: .8rem 0 0; font-size: .95rem; }

.tabs { display: none; }
.ed-grid { display: grid; grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr) minmax(19rem, 23rem); gap: 1.25rem; align-items: start; }
.ed-grid.ro { grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem); }
.pane { min-width: 0; }
.pane-h { font-size: 1rem; }

.pane-cat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.cat-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: .5rem 0; }
.cat-filters select { font-size: .85rem; padding: .35rem .4rem; }
.cat-count { font-size: .8rem; color: var(--muted); margin: 0 0 .4rem; }
.cat-list { list-style: none; margin: 0 -1rem; padding: 0; overflow-y: auto; flex: 1; border-top: 1px solid var(--line); }
.cat-item { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem 1rem; border-bottom: 1px solid var(--paper); }
.cat-txt { flex: 1; min-width: 0; }
.cat-n { display: block; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.cat-sub { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .25rem; font-size: .76rem; color: var(--muted); }
.tag { background: var(--paper); padding: 0 .4rem; border-radius: 3px; }
.cat-a { color: var(--amber); }
.cat-none, .cat-more { padding: 1rem; color: var(--muted); font-size: .9rem; list-style: none; }

.sec { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .4rem; margin-bottom: .2rem; }
.sec-h h2 { margin: 0; font-stretch: 110%; }
.sec-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.sec-empty { color: var(--muted); font-size: .92rem; margin: .7rem 0 .2rem; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--paper); }
.row:last-child { border-bottom: 0; }
.row-n { min-width: 0; }
.row-n > span:first-child { display: block; font-weight: 600; line-height: 1.3; }
.row-l { display: block; font-size: .78rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: .35rem; }
.qty input { width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; padding: .4rem .55rem; }
.qty input.need { border-color: var(--amber); background: var(--amber-bg); }
.unit { color: var(--muted); font-size: .9rem; min-width: 1.8rem; }
.qty-ro { font-variant-numeric: tabular-nums; font-weight: 600; }
.row-act { display: inline-flex; gap: .6rem; align-items: center; }
.x { font: inherit; font-size: 1.3rem; line-height: 1; width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.x:hover { background: var(--red-bg); color: var(--red); }

/* štítok: jediný výrazný prvok appky – pripomína skutočnú etiketu doplnku */
.pane-facts { position: sticky; top: 1rem; }
.label { background: var(--white); border: 3px solid var(--ink); padding: .6rem .8rem .7rem; color: var(--ink); }
.label-t { font-size: 2.15rem; font-weight: 900; font-stretch: 72%; line-height: 1; margin: 0 0 .15rem; letter-spacing: -.01em; }
.label-per { font-weight: 700; margin: 0 0 .25rem; font-stretch: 85%; }
.label-kv { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; border-top: 1px solid var(--ink); padding: .2rem 0; font-stretch: 90%; }
.label-kv strong { text-align: right; font-variant-numeric: tabular-nums; }
.label-rule { height: 9px; background: var(--ink); margin: .15rem -.1rem .1rem; }
.label-rule.thin { height: 4px; }
.label-tbl { width: 100%; border-collapse: collapse; font-stretch: 90%; }
.label-tbl thead th { font-size: .78rem; font-weight: 800; padding: .2rem 0; border-bottom: 1px solid var(--ink); }
.label-tbl th, .label-tbl td { text-align: left; padding: .35rem 0; border-bottom: 1px solid var(--ink); vertical-align: top; }
.label-tbl tr:last-child th, .label-tbl tr:last-child td { border-bottom: 0; }
.label-tbl .num { text-align: right; padding-left: .7rem; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.label-tbl tbody th { font-weight: 400; }
.l-n { display: block; font-weight: 750; line-height: 1.25; }
.l-src { display: block; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.label-empty { color: var(--muted); font-size: .9rem; padding: .6rem 0; margin: 0; }
.label-fine { font-size: .74rem; line-height: 1.35; margin: .3rem 0 0; font-stretch: 90%; }
.note-box { border-radius: var(--r); padding: .8rem 1rem; margin-top: 1rem; font-size: .9rem; }
.note-box h3 { font-size: .92rem; margin-bottom: .3rem; }
.note-box ul { margin: 0; padding-left: 1.1rem; }
.note-box li + li { margin-top: .3rem; }
.note-box p { margin: 0; }
.note-box.allergen, .note-box.warn { background: var(--amber-bg); color: var(--amber); }
.note-box.warn strong { color: var(--ink); }
.note-box.todo { background: var(--white); border: 1.5px dashed var(--line); }
.pane-facts > .btn.wide { margin-top: 1rem; }
.pane-comp .field { margin-top: 1rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); visibility: hidden; background: var(--ink); color: var(--white); padding: .7rem 1.2rem; border-radius: var(--r); font-weight: 550; max-width: min(36rem, 92vw); z-index: 100; transition: transform .2s ease; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.good { background: var(--green); }
.toast.bad { background: var(--red); }

/* menšie obrazovky */
@media (max-width: 1100px) {
  .tabs { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 2px solid var(--line); }
  .tabs button { font: inherit; font-weight: 650; background: none; border: 0; padding: .6rem .9rem; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; color: var(--muted); }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); }
  .ed-grid, .ed-grid.ro { grid-template-columns: 1fr; }
  .ed-grid .pane { display: none; }
  .ed-grid.show-cat .pane-cat, .ed-grid.show-comp .pane-comp, .ed-grid.show-facts .pane-facts { display: block; }
  .ed-grid.show-cat .pane-cat { display: flex; }
  .pane-cat, .pane-facts { position: static; max-height: none; }
  .cat-list { max-height: 65vh; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { padding: 2rem 1.25rem; }
  .auth-word { font-size: 3rem; margin-bottom: 1rem; }
  .ed-head { grid-template-columns: 1fr; }
  .ed-actions { flex-wrap: wrap; }
  .forms { grid-template-columns: repeat(2, 1fr); }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .tbl td { border: 0; padding: .2rem .9rem; text-align: left !important; }
  .tbl td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 8.5rem; color: var(--muted); font-size: .82rem; }
  .tbl .acts { padding-top: .5rem; }
  .row { grid-template-columns: 1fr auto; }
  .row-act { grid-column: 1 / -1; justify-content: space-between; }
  .mark-by { display: none; }
  .top { padding: .6rem 1rem; }
  .nav { gap: .8rem; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
