/* vlhala.portál – jednoduchý vzhľad, svetlý aj tmavý režim, mobil */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1b2330;
  --muted: #667080;
  --line: #e2e5ea;
  --accent: #2457c5;
  --accent-ink: #ffffff;
  --accent-soft: #e8eefb;
  --danger: #b42318;
  --s-napad: #7047d6;
  --s-planovane: #2457c5;
  --s-rozpracovane: #b8650a;
  --s-hotove: #17734a;
  --s-pozastavene: #687384;
  --s-idea: #0f7c86;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151b;
    --card: #1a2029;
    --text: #e7eaf0;
    --muted: #9aa3b1;
    --line: #2a313c;
    --accent: #79a2ff;
    --accent-ink: #0b1323;
    --accent-soft: #1d2a44;
    --danger: #ff8a80;
    --s-napad: #b49cff;
    --s-planovane: #79a2ff;
    --s-rozpracovane: #f0a959;
    --s-hotove: #5fd19b;
    --s-pozastavene: #a1aab8;
    --s-idea: #5ccbd4;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2rem 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .7rem; }
h3 { font-size: 1.05rem; margin: .25rem 0 .4rem; }
p { margin: .4rem 0; }

.wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 64px; }
.muted { color: var(--muted); }
.small-text { font-size: .875rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { color: var(--muted); font-size: .85rem; text-transform: lowercase; margin: 0; }

/* hlavička */
.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
}
.top-in, .tabs { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand span, .login h1 span { color: var(--accent); font-weight: 500; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 8px 12px 10px; white-space: nowrap; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-weight: 500;
}
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.logout { margin: 0; }

/* tlačidlá */
.btn {
  display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; padding: 10px 18px; text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.07); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* rozloženie */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head .muted { max-width: 60ch; }
section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: inherit;
}
a.card { text-decoration: none; display: block; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.company { color: var(--muted); font-size: .85rem; font-weight: 500; }
.next { font-size: .95rem; }
.k { color: var(--muted); }
.note { color: var(--muted); font-size: .9rem; white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* stavy */
.badge {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.s-napad { --c: var(--s-napad); }
.s-planovane { --c: var(--s-planovane); }
.s-rozpracovane { --c: var(--s-rozpracovane); }
.s-hotove { --c: var(--s-hotove); }
.s-pozastavene { --c: var(--s-pozastavene); }
.s-idea { --c: var(--s-idea); }

.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c);
  border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
}
.stat:hover { border-color: var(--c); }
.stat .num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .85rem; }

.banner {
  display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center;
  background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; text-decoration: none;
}
.banner span { color: var(--accent); font-weight: 600; }

/* zoznamy */
.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
a.row:hover { background: var(--accent-soft); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-weight: 600; }
.row-sub { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.arrow { color: var(--muted); }
.list.compact .row { padding: 8px 16px; }

.needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 0; }
.needs div { background: var(--bg); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.needs dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.needs dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.when { font-weight: 600; font-size: .9rem; }

/* formuláre */
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .92rem; }
input[type=text], input[type=password], select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; min-height: 2.6em; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { font-weight: 600; padding: 0 6px; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.actions { display: flex; align-items: center; gap: 16px; }
.actions.sticky {
  position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); margin-top: 16px;
}
.review-item { margin-bottom: 12px; background: var(--card); }
.review-item legend .company { display: block; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select { width: auto; min-width: 160px; }

.alert { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-radius: 8px; padding: 10px 12px; font-weight: 500; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.danger-zone { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }
.split-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; }
.split-actions form { margin: 0; }

.login { max-width: 380px; margin: 12vh auto 0; }
.login h1 { font-size: 1.8rem; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

@media (max-width: 600px) {
  h1 { font-size: 1.35rem; }
  .two { grid-template-columns: 1fr; }
  .head .btn { width: 100%; }
  .filters select { flex: 1; min-width: 0; }
  .needs { grid-template-columns: 1fr; }
}
