/* personalizacia.sk – portál. Farby a písmo podľa brand manuálu NIK&co. */
:root {
  --bg: #F5F1EB; --surface: #FFFDF9; --surface-2: #EDE7DC;
  --ink: #0A0A0A; --ink-2: #4A453D; --ink-3: #6F6A62; --line: #DDD5C7;
  --gold: #C9A84C; --gold-ink: #7E6418; --gold-soft: #F1E6C6;
  --side: #0A0A0A; --side-ink: #E9E3D7; --side-hover: #1D1B18;
  --ok: #1F5E3A; --ok-soft: #E5F0E8; --warn: #8A4105; --warn-soft: #FCEFE1; --bad: #A1261B; --bad-soft: #FBE9E7;
  --display: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  --body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0F0E0D; --surface: #1A1917; --surface-2: #24221F; --ink: #F5F1EB; --ink-2: #C9C1B3; --ink-3: #A8A298;
  --line: #2F2C27; --gold: #C9A84C; --gold-ink: #E2C47A; --gold-soft: #2E2716;
  --ok: #9CCFAE; --ok-soft: #13241A; --warn: #E9A35E; --warn-soft: #2A1F12; --bad: #E07A6A; --bad-soft: #2B1714;
  color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.55 var(--body); }
a { color: var(--gold-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: .8rem; }
.eyebrow { font: 600 .7rem/1 var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); }
.inline { display: inline; margin: 0; }

.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; text-decoration: none; color: var(--side-ink); }
.brand b { font: 700 1.15rem/1 var(--display); letter-spacing: .02em; }
.brand b span { color: var(--gold); }
.brand small { font-size: .72rem; color: #9A9284; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--side-ink); text-decoration: none; padding: 9px 10px; border-radius: var(--r); display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.nav a:hover { background: var(--side-hover); }
.nav a.on { background: var(--side-hover); color: var(--gold); box-shadow: inset 2px 0 0 var(--gold); }
.nav .sep { border-top: 1px solid #262320; margin: 8px 0; }
.firma-switch { display: grid; gap: 6px; padding: 0 8px; }
.firma-switch select { width: 100%; background: #1D1B18; color: var(--side-ink); border: 1px solid #34302A; border-radius: var(--r); padding: 6px 8px; }
.firma-name { padding: 0 8px; font-size: .86rem; color: var(--side-ink); }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #262320; font-size: .76rem; color: #9A9284; display: grid; gap: 6px; }
.side-foot b { color: var(--side-ink); font-weight: 500; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); cursor: pointer; text-align: left; font-size: .76rem; }
.side-foot a { color: var(--gold); text-decoration: none; }

.main { min-width: 0; padding-block: 24px 48px; padding-inline: clamp(16px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.topbar .who { display: grid; gap: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--r); cursor: pointer; font-weight: 500; font-size: .86rem; text-decoration: none; color: var(--ink); display: inline-block; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--gold); border-color: var(--gold); color: #0A0A0A; }
.btn.sm { padding: 4px 10px; font-size: .78rem; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }

.flash { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flash li { padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); border-left: 3px solid var(--ink-3); }
.flash .success { background: var(--ok-soft); border-color: var(--ok); }
.flash .danger { background: var(--bad-soft); border-color: var(--bad); }
.flash .warning { background: var(--warn-soft); border-color: var(--warn); }
.flash .info { background: var(--gold-soft); border-color: var(--gold); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: dense; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--surface); padding: 14px 16px; display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.kpi:hover { background: var(--surface-2); }
.kpi .v { font: 700 1.7rem/1.1 var(--display); }
.kpi .l { font-size: .78rem; color: var(--ink-2); }
.kpi .s { font-size: .72rem; color: var(--ink-3); }
.kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { display: grid; gap: 12px; min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; flex-wrap: wrap; }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; }
.alerts li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.gold { background: var(--gold); }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 110px 1fr 80px; gap: 10px; align-items: center; font-size: .82rem; }
.bar .track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); border-radius: 99px; }
.bar .fill.warn { background: var(--warn); }
.bar .amt { text-align: right; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font: 600 .68rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 12px 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
td a.row-link { color: var(--ink); text-decoration: none; font-weight: 500; }
td a.row-link:hover { color: var(--gold-ink); }
.id { font-size: .76rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.chip { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input[type=search], input[type=text], input[type=date], input[type=number], input[type=password], select, textarea {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 8px 10px; min-width: 0; }
.toolbar input[type=search] { flex: 1 1 220px; max-width: 340px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; flex-wrap: wrap; }
.seg a { background: var(--surface); padding: 7px 12px; font-size: .82rem; text-decoration: none; color: var(--ink); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--ink); color: var(--bg); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card-head { padding: 20px 22px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--gold-soft), transparent 70%); }
.card-head .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--ink-2); margin-top: 6px; }
.card-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sec { padding: 18px 22px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.sec:nth-child(odd) { border-right: 1px solid var(--line); }
.sec.full { grid-column: 1 / -1; border-right: 0; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; }
.items li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .86rem; }
.items li:first-child { border-top: 0; }
.items .sub { font-size: .74rem; color: var(--ink-3); }
.items .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.empty { font-size: .82rem; color: var(--ink-3); font-style: italic; }
.assign { display: flex; gap: 6px; }
.assign select, .assign input { flex: 1 1 0; width: 0; min-width: 0; font-size: .8rem; padding: 5px 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 86px 1fr; gap: 10px; font-size: .82rem; }
.timeline li.empty { display: block; }
.timeline time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
details.edit summary { cursor: pointer; color: var(--gold-ink); font-size: .82rem; }

.procs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.proc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 10px; text-decoration: none; color: var(--ink); align-content: start; }
a.proc:hover { border-color: var(--ink-3); }
.proc .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); }
.check { list-style: none; margin: 0; padding: 0; }
.check li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check li.done .t { text-decoration: line-through; color: var(--ink-3); }
.check .tick { width: 22px; height: 22px; border: 1.5px solid var(--ink-3); border-radius: 4px; background: var(--surface); cursor: pointer; padding: 0; line-height: 1; font-size: .8rem; }
.check li.done .tick { background: var(--gold); border-color: var(--gold); color: #0A0A0A; }
.check .t { font-size: .88rem; }
.check .o { font-size: .74rem; color: var(--ink-3); }
.check .due { font-size: .78rem; white-space: nowrap; text-align: right; }
.plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plan div { padding: 12px 14px; display: grid; gap: 4px; align-content: start; border-right: 1px solid var(--line); background: var(--surface); }
.plan div:last-child { border-right: 0; }
.plan b { font: 700 .82rem/1.2 var(--display); }
.plan span { font-size: .8rem; color: var(--ink-2); }
.note { font-size: .78rem; color: var(--ink-3); border-left: 2px solid var(--gold); padding-left: 10px; margin: 0; }

.formbox { background: var(--surface); border: 1px solid var(--gold); border-radius: 10px; padding: 18px; display: grid; gap: 14px; }
.formbox.plain { border-color: var(--line); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { display: grid; gap: 4px; font-size: .78rem; color: var(--ink-2); }
.field input, .field select, .field textarea { font-size: .88rem; color: var(--ink); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: .86rem; }

.soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.soon-card { border: 1px dashed var(--gold); border-radius: 10px; padding: 22px; display: grid; gap: 10px; background: var(--surface); align-content: start; }
.soon-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .86rem; display: grid; gap: 4px; }

/* Prihlásenie */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--side); color: var(--side-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.login-art h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; max-width: 16ch; }
.login-art h1 em { font-style: normal; color: var(--gold); }
.login-art p { color: #A8A298; max-width: 44ch; }
.login-form { display: grid; place-items: center; padding: 32px 16px; }
.login-form form { width: 100%; max-width: 360px; display: grid; gap: 14px; }

.mobile-nav { display: none; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-nav { display: flex; gap: 6px; overflow-x: auto; background: var(--side); padding: 10px 16px; position: sticky; top: 0; z-index: 5; }
  .mobile-nav a { color: var(--side-ink); text-decoration: none; white-space: nowrap; padding: 6px 10px; border-radius: var(--r); font-size: .82rem; }
  .mobile-nav a.on { background: var(--side-hover); color: var(--gold); }
  .card-body { grid-template-columns: 1fr; } .sec:nth-child(odd) { border-right: 0; }
  .plan { grid-template-columns: 1fr 1fr; }
  .soon-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 28px 16px; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bar { grid-template-columns: 84px 1fr 70px; } }
