:root {
  --ink: #1c2430;
  --muted: #5c6775;
  --line: #d5dbe3;
  --paper: #fff;
  --bg: #f3f5f7;
  --accent: #0f6b4c;
  --accent-dark: #0b5340;
  --warn-bg: #fff4d6;
  --warn: #8a5a00;
  --bad: #9b2c2c;
  --ok-bg: #e5f6ee;
  --bad-bg: #fde8e8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--accent-dark); }
header {
  background: linear-gradient(180deg, #243352 0%, #1a2740 100%);
  border-bottom: 3px solid #e0a04a;
  color: #f4f7fb;
}
.horny {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1rem 0.35rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.znacka { font-weight: 700; color: #fff; text-decoration: none; letter-spacing: 0.02em; }
.firma-nazov { color: #c5d0e0; font-size: 0.92rem; }
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
nav form { margin: 0; }
nav a, nav button {
  font: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  cursor: pointer;
}
nav a:hover, nav button:hover { background: rgba(255, 255, 255, 0.16); }
nav a.aktivna {
  background: #e0a04a;
  border-color: #e0a04a;
  color: #1c1408;
}
button, .tlacidlo {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  cursor: pointer;
}
button.primarne, .tlacidlo.primarne {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.nebezpecne { color: var(--bad); }
main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.karta {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
h1 { font-size: 1.45rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.7rem; }
label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 0.2rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 6rem; }
.mrizka, .dvojica {
  display: grid;
  gap: 0.8rem;
}
.dvojica { grid-template-columns: 1fr; }
.mrizka { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pod-sebou { display: grid; gap: 0.8rem; }
.akcie, .riadok-akcii { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.sprava { padding: 0.7rem 0.8rem; border-radius: 6px; margin-bottom: 0.8rem; }
.sprava.ok { background: var(--ok-bg); }
.sprava.chyba { background: var(--bad-bg); color: var(--bad); }
.upozornenie { background: var(--warn-bg); color: var(--warn); padding: 0.7rem 0.8rem; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.cislo, .suma { text-align: right; white-space: nowrap; }
tr.po-splatnosti { background: var(--warn-bg); }
.tabulka-obal { overflow-x: auto; }
.prazdne { color: var(--muted); }
.mesiace { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; }
.mesiac { display: flex; gap: 0.35rem; align-items: center; }
.mesiac input { width: auto; }
.checkbox { display: flex; gap: 0.45rem; align-items: center; }
.checkbox input { width: auto; }
.sadzba-riadok { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: center; margin-bottom: 0.4rem; }
.sadzba-riadok input[type="radio"] { width: auto; }
.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.filter label { margin: 0; }
.filter select, .filter button { width: auto; }
.logo-nahled { max-height: 64px; max-width: 180px; }
#doplnit-ico { width: auto; margin-top: 0.35rem; }
.dve-strany { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) {
  .dvojica, .dve-strany { grid-template-columns: 1fr 1fr; }
}
body:has(.vstup) header { display: none; }
body:has(.vstup) main {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:has(.vstup) .sprava { margin: 1rem 1rem 0; }
.vstup {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  min-height: 100vh;
}
.vstup-obraz {
  background: #0f6b4c;
  color: #e7f6ef;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 2rem;
}
.faktura-kresba { width: min(100%, 380px); height: auto; }
.vstup-text { max-width: 320px; text-align: center; }
.vstup-znacka { margin: 0 0 0.35rem; color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.vstup-text p:last-child { margin: 0; color: #d7efe4; }
.vstup-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg);
}
.vstup-form h1,
.vstup-form form,
.vstup-odkaz { width: 100%; max-width: 380px; }
.vstup-form h1 { margin-bottom: 1.2rem; }
.vstup-form .primarne { min-width: 9rem; }
.vstup-odkaz { max-width: 380px; color: var(--muted); }
@media (max-width: 800px) {
  .vstup { grid-template-columns: 1fr; min-height: auto; }
  .vstup-obraz { min-height: 0; padding: 1.5rem 1rem 1rem; }
  .faktura-kresba { width: min(100%, 220px); }
  .vstup-form { padding: 1.5rem 1rem 2rem; }
}
@media (max-width: 720px) {
  .polozky thead { display: none; }
  .polozky tr { display: block; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.6rem; padding: 0.4rem; }
  .polozky td { display: block; border: 0; }
  .polozky td::before { content: attr(data-nazov); display: block; color: var(--muted); font-size: 0.78rem; }
}

body:not(:has(.vstup)) {
  background:
    radial-gradient(circle at 0% -8%, #ffe7a3 0, transparent 34%),
    radial-gradient(circle at 100% 0%, #ffd0e6 0, transparent 32%),
    radial-gradient(circle at 90% 100%, #c9f6e4 0, transparent 36%),
    #fff6ee;
}
body:not(:has(.vstup)) main {
  padding: 1.35rem 1.1rem 2.8rem;
}
body:not(:has(.vstup)) main h1 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: #3d2a63;
}
body:not(:has(.vstup)) main h2 {
  color: #d4537e;
}
body:not(:has(.vstup)) main a {
  color: #c43b78;
}
body:not(:has(.vstup)) main .karta {
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
  box-shadow: 0 14px 34px rgba(214, 112, 92, 0.1);
  padding: 1.15rem 1.2rem 1.2rem;
}
body:not(:has(.vstup)) main button,
body:not(:has(.vstup)) main .tlacidlo {
  border: 1px solid #f3c7b4;
  background: #fff;
  color: #5c3d6e;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  box-shadow: 0 4px 0 #ffe3c4;
}
body:not(:has(.vstup)) main button:hover,
body:not(:has(.vstup)) main .tlacidlo:hover {
  background: #fff7ef;
}
body:not(:has(.vstup)) main button.primarne,
body:not(:has(.vstup)) main .tlacidlo.primarne {
  background: linear-gradient(180deg, #ff8f6b 0%, #f25586 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(242, 85, 134, 0.28);
}
body:not(:has(.vstup)) main button.primarne:hover,
body:not(:has(.vstup)) main .tlacidlo.primarne:hover {
  background: linear-gradient(180deg, #ff9d7c 0%, #e44578 100%);
}
body:not(:has(.vstup)) main button.nebezpecne {
  color: #c2416b;
  background: #fff5f8;
  border-color: #f3b4c8;
  box-shadow: none;
}
body:not(:has(.vstup)) main input,
body:not(:has(.vstup)) main select,
body:not(:has(.vstup)) main textarea {
  border: 1px solid #f0cbb8;
  border-radius: 14px;
  background: #fff;
  padding: 0.55rem 0.7rem;
}
body:not(:has(.vstup)) main input:focus,
body:not(:has(.vstup)) main select:focus,
body:not(:has(.vstup)) main textarea:focus {
  outline: 3px solid #ffe08a;
  border-color: #f0a04b;
}
body:not(:has(.vstup)) main label {
  color: #8a6a9a;
  font-weight: 600;
}
body:not(:has(.vstup)) main table {
  border-collapse: separate;
  border-spacing: 0;
}
body:not(:has(.vstup)) main th {
  color: #8b5cab;
  background: #fff1f8;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
body:not(:has(.vstup)) main th:first-child { border-radius: 12px 0 0 12px; }
body:not(:has(.vstup)) main th:last-child { border-radius: 0 12px 12px 0; }
body:not(:has(.vstup)) main td { border-bottom-color: #f6e4d8; }
body:not(:has(.vstup)) main tbody tr:hover td { background: #fff8ee; }
body:not(:has(.vstup)) main tr.po-splatnosti td { background: #fff1d6; }
body:not(:has(.vstup)) main .sprava {
  border-radius: 16px;
}
body:not(:has(.vstup)) main .sprava.ok {
  background: #e7fff4;
  color: #0f7a52;
  border: 1px solid #9be4c4;
}
body:not(:has(.vstup)) main .sprava.chyba {
  background: #ffe8ef;
  border-radius: 16px;
}
body:not(:has(.vstup)) main .upozornenie {
  background: #fff4c8;
  color: #8a5a00;
  border-radius: 16px;
  border: 1px solid #f3d98a;
}
body:not(:has(.vstup)) main .prazdne { color: #8d7394; }
