:root {
  --accent: #e10600;          /* červený akcent z loga */
  --accent-dark: #b60500;
  --ink: #181818;             /* čierna z loga */
  --sidebar: #181818;
  --sidebar-hover: #262626;
  --bg: #eef0f2;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #e3e6ea;
  --ok: #1a7f37;
  --warn: #b7791f;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
h2 { font-size: 1.15rem; font-weight: 600; }

/* ---------- Topbar ---------- */
.topbar {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 34px; width: auto; display: block; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { font-weight: 600; font-size: .9rem; color: var(--ink); }
.badge {
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}

/* ---------- Shell / sidebar ---------- */
.shell { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 240px; background: var(--sidebar); color: #cfd2d6;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 64px; height: calc(100vh - 64px);
}
.sidebar nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 8px; color: #cfd2d6; font-weight: 500;
  font-size: .93rem; border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-hover); color: #fff; border-left-color: var(--accent); }
.nav-ico { font-size: 1.05rem; width: 22px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 16px; font-size: .72rem; color: #7a7d82; border-top: 1px solid #2a2a2a; }

/* ---------- Content ---------- */
.content { flex: 1; padding: 26px 30px; min-width: 0; }
.page-head { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--ink); }
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat .ico { font-size: 1.4rem; }

.section { margin-top: 26px; }
.section > h2 { margin: 0 0 12px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
th { background: #f7f8fa; font-weight: 600; color: #444; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.muted { color: var(--muted); }

/* ---------- Badges / statuses ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.pill.planned { background: #eef1f5; color: #55606e; }
.pill.in_progress, .pill.active { background: #e7f0ff; color: #1d4ed8; }
.pill.done { background: #e6f4ea; color: var(--ok); }
.pill.paused { background: #fdf0e2; color: var(--warn); }
.pill.todo { background: #eef1f5; color: #55606e; }
.pill.high { background: #fdeaea; color: var(--accent); }
.pill.medium { background: #fdf0e2; color: var(--warn); }
.pill.low { background: #eef1f5; color: #55606e; }

/* ---------- Forms ---------- */
form.inline { display: inline; margin: 0; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: .82rem; font-weight: 600; color: #444; }
input, select, textarea {
  font-family: inherit; font-size: .92rem; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: .9rem; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f3f4f6; text-decoration: none; }
.btn-sm { padding: 6px 10px; font-size: .8rem; }
.btn-danger { background: transparent; border-color: #f0c2c2; color: var(--accent); }
.btn-danger:hover { background: #fdeaea; text-decoration: none; }
.btn-link { color: var(--muted); font-size: .85rem; font-weight: 600; }
.btn-link:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.alert-error { background: #fdeaea; color: #a11; border: 1px solid #f5c2c2; }
.alert-info { background: #eaf2ff; color: #1d4ed8; border: 1px solid #c8dcff; }
.alert-warn { background: #fff7e6; color: #92600a; border: 1px solid #f4dca0; }
.alert code { background: rgba(0,0,0,.08); padding: 2px 8px; border-radius: 6px; font-size: 1rem; font-weight: 700; }

/* ---------- Public (landing + login) ---------- */
.public { background: linear-gradient(160deg, #1c1c1c 0%, #2b2b2b 55%, #3a1210 100%); min-height: 100vh; color: #fff; }
.public-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: #fff; color: var(--text); width: 100%; max-width: 400px; border-radius: 14px; padding: 34px 30px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.auth-card .logo { display: block; height: 46px; margin: 0 auto 8px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 22px; }
.auth-card h1 { text-align: center; font-size: 1.2rem; margin-bottom: 4px; }

.landing { max-width: 860px; margin: 0 auto; text-align: center; padding: 40px 24px; }
.landing .logo { height: 74px; background: #fff; padding: 16px 22px; border-radius: 12px; }
.landing h1 { font-size: 2.1rem; margin: 26px 0 8px; color: #fff; }
.landing .tag { color: #d3524f; font-weight: 600; letter-spacing: .02em; }
.landing p.desc { color: #d0d2d5; max-width: 620px; margin: 16px auto 28px; }
.landing .cta { display: inline-flex; }
.company-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; margin-top: 40px; color: #a9acb1; font-size: .82rem; }
.company-facts b { color: #e6e7e9; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { display: none; }
  .content { padding: 18px; }
}
