/* E-REAL – administrácia (ukážka vzhľadu) */
:root {
  --ink: #0f2138; --navy: #17345a; --gold: #ceb179; --gold-2: #b08c50;
  --bg: #f4f1ea; --card: #fff; --line: #e8e2d6; --muted: #6b7686;
  --ok: #2f8a5b; --warn: #c7882b; --bad: #b8573a;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; font-variant-numeric: lining-nums tabular-nums; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .25s, border-color .25s, transform .25s; }
.b:hover { border-color: var(--ink); }
.b.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.b.gold:hover { background: #d8be8b; }
.b.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.b.ghost { background: transparent; }
.b.big { padding: 15px; font-size: 15px; width: 100%; }
.b.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }

/* login */
.login { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 100vh; background: #fff; }
.login-art { position: relative; overflow: hidden; }
.login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes kb { to { transform: scale(1.12); } }
.login-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15, 33, 56, .85), transparent 55%); }
.login-quote { position: absolute; left: 50px; right: 50px; bottom: 50px; z-index: 1; color: #fff; display: grid; gap: 10px; }
.login-quote b { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1.1; }
.login-quote span { color: var(--gold); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.login-box { align-self: center; justify-self: center; width: min(400px, 100% - 32px); display: grid; gap: 16px; padding: 40px 0; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }
.login-box h1 { font-family: var(--serif); font-weight: 500; font-size: 48px; margin: 20px 0 0; line-height: 1; }
.login-box p { margin: 0 0 10px; color: var(--muted); }
.login-box label { display: grid; gap: 6px; font-weight: 700; font-size: 12px; color: var(--muted); }
.login-box input { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 15px; font-weight: 500; color: var(--ink); }
.login-box input:focus { border-color: var(--gold-2); }
.login-box small { color: var(--muted); text-align: center; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand svg { width: 28px; }
.brand b { font-family: var(--serif); font-size: 26px; letter-spacing: .1em; font-weight: 600; }

/* rozloženie */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
@keyframes fade { from { opacity: 0; } }
.side { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 22px 16px; gap: 26px; }
.side .brand { padding: 0 8px; }
#nav { display: grid; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: rgba(255, 255, 255, .7); font-weight: 600; transition: background .25s, color .25s; }
#nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
#nav a.on { background: rgba(206, 177, 121, .14); color: var(--gold); }
#nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#nav .cnt { margin-left: auto; font-size: 11px; background: rgba(255, 255, 255, .1); padding: 2px 8px; border-radius: 999px; }
#nav .cnt.hot { background: var(--gold); color: var(--ink); }
.side-foot { margin-top: auto; display: grid; gap: 14px; }
.side-foot .b { color: #fff; border-color: rgba(255, 255, 255, .2); }
.me { display: flex; gap: 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.me small { display: block; color: rgba(255, 255, 255, .55); font-size: 12px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 14px 30px; background: rgba(244, 241, 234, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { border: 0; outline: none; background: transparent; padding: 11px 0; width: 100%; }
.top-r { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.demo { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); border: 1px dashed var(--gold-2); padding: 6px 10px; border-radius: 999px; }
.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); position: relative; cursor: pointer; flex: none; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); }
.burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
.view { padding: 28px 30px 60px; display: grid; gap: 22px; }
.h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.h h1 { font-family: var(--serif); font-weight: 500; font-size: 44px; margin: 0; line-height: 1; }
.h p { margin: 6px 0 0; color: var(--muted); }
.h .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* karty */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; }
.card h3 { margin: 0 0 14px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h3 small { font-weight: 600; color: var(--muted); font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { display: grid; gap: 4px; }
.kpi small { color: var(--muted); font-weight: 700; font-size: 12px; }
.kpi b { font-family: var(--serif); font-size: 42px; font-weight: 600; line-height: 1.05; }
.kpi .d { font-size: 12px; font-weight: 700; color: var(--ok); }
.kpi .d.n { color: var(--muted); }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark small { color: rgba(255, 255, 255, .6); }
.kpi.dark b { color: var(--gold); }
.g2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* graf – stĺpce po týždňoch */
.cols { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.cols div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.cols i { width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: #e7dcc8; }
.cols div:last-child i { background: var(--gold); }
.cols span { font-size: 11px; color: var(--muted); }
.cols em { font-style: normal; font-size: 11px; font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } }
/* pruhy podľa regiónu */
.bars { display: grid; gap: 12px; }
.bars .r { display: grid; grid-template-columns: 130px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.bars .t { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bars .t i { display: block; height: 100%; background: var(--navy); border-radius: 6px; }
.bars .r b { text-align: right; }
@keyframes growx { from { transform: scaleX(0); } }

/* zoznam / tabuľka */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: #faf8f3; }
.tbl .num { text-align: right; white-space: nowrap; font-weight: 700; }
.thumb { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg); }
.thumb b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; line-height: 1.3; }
.thumb small { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.ok { color: var(--ok); background: #e8f3ec; }
.tag.warn { color: var(--warn); background: #faf0df; }
.tag.bad { color: var(--bad); background: #f7e6e0; }
.tag.mute { color: var(--muted); }
.tbl-wrap { overflow-x: auto; margin: 0 -20px -20px; padding: 0 8px 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-weight: 600; outline: none; }
.chips { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.chips button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.chips button.on { background: var(--ink); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; color: var(--muted); }
.icon-b { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: inline-grid; place-items: center; cursor: pointer; }
.icon-b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #d9d2c4; border: 0; cursor: pointer; transition: background .25s; flex: none; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.sw.on { background: var(--ok); }
.sw.on::after { transform: translateX(16px); }

/* dopyty – kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: #ece6da; border-radius: 16px; padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 300px; }
.col > h4 { margin: 2px 4px 4px; display: flex; justify-content: space-between; font-size: 13px; }
.col > h4 span { color: var(--muted); }
.lead { background: var(--card); border-radius: 14px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 1px 0 var(--line); cursor: grab; transition: transform .25s, box-shadow .25s; }
.lead:hover { border-color: var(--gold-2); }
.lead b { font-size: 14px; }
.lead p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.lead .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.lead .prop { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; background: var(--bg); padding: 6px; border-radius: 10px; }
.lead .prop img { width: 36px; height: 28px; border-radius: 6px; object-fit: cover; }
.col, .lead, .lead .prop, .lead .prop span { min-width: 0; }
.lead .prop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* editor */
.ed { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.fg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fg .full { grid-column: 1 / -1; }
.f { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fg > *, .f > * { min-width: 0; }
.f input, .f select, .f textarea { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line); background: #fbfaf7; outline: none; font-size: 14px; font-weight: 500; color: var(--ink); resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--gold-2); background: #fff; }
.f .pre { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fbfaf7; }
.f .pre input { border: 0; background: transparent; flex: 1; min-width: 0; }
.f .pre span { padding: 0 12px; color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photos div { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; cursor: grab; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos div:first-child { grid-column: span 2; grid-row: span 2; }
.photos div:first-child::after { content: "Titulná"; position: absolute; left: 8px; top: 8px; background: var(--gold); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.photos .add { display: grid; place-items: center; border: 2px dashed var(--line); color: var(--muted); font-weight: 700; background: #fbfaf7; cursor: pointer; text-align: center; font-size: 12px; }
.check-l { display: flex; flex-wrap: wrap; gap: 8px; }
.check-l label { display: flex; gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 13px; }
.check-l input { accent-color: var(--navy); }
.side-card { display: grid; gap: 14px; position: sticky; top: 86px; }
.mini-map { height: 260px; border-radius: 8px; overflow: hidden; isolation: isolate; }
.list-map { height: 620px; max-height: 72vh; border-radius: 8px; overflow: hidden; isolation: isolate; }
.list-map[hidden], #listTbl[hidden] { display: none; }
.er-pin { width: 26px; height: 34px; cursor: grab; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 34'%3E%3Cpath d='M13 33C13 33 1 20 1 12.5a12 12 0 0 1 24 0C25 20 13 33 13 33z' fill='%230f2138' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='13' cy='12.5' r='4.5' fill='%23ceb179'/%3E%3C/svg%3E"); }
.mpop { display: grid; gap: 4px; font-family: var(--sans); color: var(--ink); }
.mpop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.mpop b { font-size: 17px; }
.mpop span { font-size: 13px; font-weight: 600; line-height: 1.35; }
.mpop small { color: var(--muted); font-size: 12px; }
.mpop .b { margin-top: 6px; justify-content: center; }
.maplibregl-popup-content { padding: 10px; border-radius: 8px; }
.photos .del { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(15, 33, 56, .75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.f small { color: var(--muted); }
.f .check-l input { width: auto; padding: 0; margin: 0; }
.f .check-l label { font-size: 13px; color: var(--ink); font-weight: 600; }
.f .check-l label:has(input:checked) { border-color: var(--navy); background: #f1f3f6; }
.seo { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; font-size: 13px; }
.seo .u { color: var(--ok); font-size: 12px; }
.seo .t { color: #1a0dab; font-size: 16px; }
.seo .d { color: var(--muted); }
.pin { position: absolute; transform: translate(-50%, calc(-100% - 6px)); background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.pin-wrap { background: none; border: 0; }

/* kalendár */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.cal > div { background: var(--card); min-height: 96px; padding: 8px; display: grid; align-content: start; gap: 4px; font-size: 12px; }
.cal .dn { min-height: 0; text-align: center; font-weight: 800; color: var(--muted); padding: 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.cal .o { color: #c9c2b4; }
.cal .today { background: #fbf6ec; }
.cal .today > span { background: var(--ink); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal .ev { background: #e8eef6; color: var(--navy); border-left: 3px solid var(--navy); padding: 3px 6px; border-radius: 6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.v { background: #f5ecdc; color: #7a5b25; border-color: var(--gold-2); }

/* nastavenia */
.set { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.set nav { display: grid; gap: 2px; }
.set nav a { padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.set nav a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.opt { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.opt small { display: block; color: var(--muted); font-weight: 500; }
.sw-list .opt b { font-size: 14px; }
.colors { display: flex; gap: 8px; }
.colors i { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, calc(100% + 40px)); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; font-weight: 600; transition: transform .5s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g2, .g3, .ed, .set { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; width: 260px; transform: translateX(-100%); transition: transform .5s var(--ease); }
  .nav-open .side { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .3); }
  .burger { display: block; }
  .top { padding: 12px 16px; }
  .view { padding: 20px 16px 50px; }
  .demo { display: none; }
  .h h1 { font-size: 36px; }
  .fg { grid-template-columns: 1fr; }
  .bars .r { grid-template-columns: 100px 1fr 30px; }
  .cal > div { min-height: 64px; padding: 4px; }
  .cal .ev { font-size: 10px; padding: 2px 4px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 32px; }
  .top-r .b { padding: 10px 12px; }
  .search { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
