:root {
  --ink: #111312; --ink-2: #3a3e3c; --muted: #6d726f; --line: #e3e5e1; --paper: #f6f6f3; --white: #fff;
  --accent: #c6f24e; --accent-ink: #1d2a00; --red: #c4321f; --amber: #b77806; --green: #2f7a3a;
  --r: 10px; --ui: "Inter Tight", "Inter", system-ui, sans-serif; --text: "Inter", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 var(--text); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--ui); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 700; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
small { font-size: 13px; color: var(--muted); }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.main { padding: 36px 0 80px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.top { background: var(--ink); color: #fff; }
.top__in { height: 60px; display: flex; align-items: center; gap: 32px; }
.brand { font-family: var(--ui); font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: .02em; }
.brand span { font-weight: 500; color: var(--accent); margin-left: 4px; }
.brand--lg { font-size: 18px; margin-bottom: 28px; }
.auth .brand span { color: var(--ink-2); }
.top__nav { display: flex; gap: 22px; }
.top__nav a { text-decoration: none; font-weight: 500; color: rgba(255,255,255,.7); padding: 6px 0; }
.top__nav a:hover, .top__nav a[aria-current] { color: #fff; }
.top__nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.top__me { margin-left: auto; display: flex; gap: 16px; align-items: center; color: rgba(255,255,255,.75); }
.top__me .link { color: rgba(255,255,255,.75); }
.top__me form { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r);
  font: 600 15px var(--ui); background: var(--ink); color: #fff; border: 1.5px solid var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); border-color: #c9ccc7; }
.btn--ghost:hover { background: var(--white); border-color: var(--ink); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }
.link--danger { color: var(--red); }
:focus-visible { outline: 3px solid #8fb31c; outline-offset: 2px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.head .muted { margin-top: 6px; }
.back { display: inline-block; text-decoration: none; color: var(--muted); margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.block { margin-top: 40px; }

.form { display: grid; gap: 16px; max-width: 420px; }
.form--wide { max-width: 760px; }
.form--row { max-width: none; grid-template-columns: 1fr 1.2fr 1fr auto; align-items: end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
label small { font-weight: 400; }
input, select, textarea { font: 15px var(--text); color: var(--ink); background: var(--white); border: 1.5px solid #d3d6d1; border-radius: 8px; padding: 10px 12px; width: 100%; }
input[type=file] { padding: 8px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.inline { display: flex; gap: 10px; align-items: center; }
.inline select, .inline input { width: auto; }
.inline input.mono { flex: 1; }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
details[open] summary { margin-bottom: 12px; }
.inline-h { display: inline; margin: 0; }

.alert { background: #fbe9e6; color: var(--red); padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice { background: var(--white); border: 1.5px solid var(--accent); box-shadow: inset 4px 0 0 var(--accent); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 12px; }

.auth { max-width: 400px; margin: 8vh auto 0; display: grid; gap: 16px; }
.auth .form { max-width: none; }

.table { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); text-decoration: none; }
.row:first-child { border-top: 0; }
a.row:hover { background: #fafaf7; }
.row--head { font-size: 13px; color: var(--muted); font-weight: 500; padding-block: 10px; background: #fafaf8; }
.row > span { display: grid; gap: 2px; min-width: 0; }
.row strong { font-weight: 600; }
.row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > span:nth-child(2) { display: flex; gap: 4px; flex-wrap: wrap; }
.row--users { grid-template-columns: 2fr 1fr .7fr 1fr 1.3fr; }
.row--users > span:nth-child(2) { display: grid; }
.row--off { opacity: .5; }
.actions { display: flex !important; gap: 16px; justify-content: flex-end; }
.actions form { margin: 0; }
.chip { font-style: normal; font: 600 12px var(--ui); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }

.state { font-style: normal; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b8bbb6; }
.state--bezi { color: var(--accent-ink); } .state--bezi::before { background: #7fae00; }
.state--caka { color: var(--amber); } .state--caka::before { background: var(--amber); }
.state--hotovo { color: var(--green); } .state--hotovo::before { background: var(--green); }
.state--chyba { color: var(--red); } .state--chyba::before { background: var(--red); }

.empty { background: var(--white); border: 1px dashed #cfd2cc; border-radius: var(--r); padding: 48px; display: grid; gap: 16px; justify-items: start; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.card__frame { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #ddd; border-bottom: 1px solid var(--line); }
.card__frame iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; pointer-events: none; }
.card__body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.card__body p { color: var(--ink-2); font-size: 14px; }
.card__links { display: flex; gap: 18px; margin-top: 6px; font-weight: 500; }

.job { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 10px; margin-bottom: 12px; }
.job__head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.job__head form { margin: 0 0 0 auto; }
.job__task { white-space: pre-line; color: var(--ink-2); font-size: 14px; }
.job__result:empty { display: none; }
.job__result, .prose { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.job__result ul, .prose ul { margin: 0; padding-left: 20px; }
.job__result h4, .prose h4 { font-size: 15px; margin-top: 6px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.log { list-style: none; margin: 0; padding: 12px 14px; background: #15171a; color: #d7dad4; border-radius: 8px; font: 13px/1.6 ui-monospace, Menlo, monospace; max-height: 420px; overflow: auto; display: grid; gap: 2px; }
.log:empty::before { content: "Zatiaľ nič…"; color: #7d827c; }
.log li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; white-space: pre-wrap; word-break: break-word; }
.log time { color: #7d827c; }
.log .k-text { color: #fff; }
.log .k-nastroj { color: #a9ae9f; }
.log .k-chyba { color: #ff8d7a; }
.log .k-info { color: var(--accent); }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  h1 { font-size: 24px; }
  .top__in { gap: 18px; } .top__me span { display: none; }
  .grid2, .form--row { grid-template-columns: 1fr; }
  .row, .row--users { grid-template-columns: 1fr auto; }
  .row--head { display: none; }
  .row > span:nth-child(n+3) { display: none; }
  .row > span:last-child, .row--users .actions { display: flex !important; }
  .inline { flex-wrap: wrap; }
}

/* sprievodca nového návrhu */
.wizard { display: grid; gap: 20px; max-width: 820px; }
.step { margin: 0; border: 1px solid var(--line); background: var(--white); border-radius: var(--r); padding: 22px 24px 24px; display: grid; gap: 16px; min-width: 0; }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font: 600 17px var(--ui); display: flex; align-items: center; gap: 10px; }
.step legend b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--accent); font-size: 13px; }
.step legend + * { clear: both; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice--3 { grid-template-columns: repeat(3, 1fr); }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #d9dcd6; border-radius: 8px; padding: 12px 14px; cursor: pointer; font-weight: 400; }
.opt:hover { border-color: #aeb2ab; }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fbfcf7; }
.opt input { width: auto; margin: 3px 0 0; accent-color: var(--ink); }
.opt span { display: grid; gap: 2px; }
.opt strong { font: 600 15px var(--ui); }
.submit { display: grid; gap: 10px; justify-items: start; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
[data-if][hidden] { display: none !important; }
.flash { background: var(--ink); color: #fff; border-radius: var(--r); padding: 16px 20px; margin-bottom: 24px; box-shadow: inset 4px 0 0 var(--accent); }
.card--chosen { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.badge { font: 600 12px var(--ui); background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 2px 8px; justify-self: start; }
.feedback { display: grid; gap: 8px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.feedback textarea { font-size: 14px; }
.feedback .inline { flex-wrap: wrap; }
@media (max-width: 760px) { .choice, .choice--3 { grid-template-columns: 1fr; } .step { padding: 18px; } }

.field { display: grid; gap: 8px; }
.field__label { font-weight: 500; font-size: 14px; }
.choice--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .choice--4 { grid-template-columns: 1fr 1fr; } }
