:root {
  --brand: #1F4FCC;
  --brand-dark: #16379A;
  --brand-soft: #A9BDF2;
  --text: #1b2033;
  --muted: #5f6677;
  --border: #dfe4ef;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --ok: #1a7f4b;
  --bad: #b3261e;
  --grid: #e5e9f2;
  --reference: #e07a1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}

.app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

/* Boční menu */

.side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 16px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--brand-dark), #0F2766);
}

.logo {
  margin: 0 8px 18px;
  font-size: 22px;
  font-weight: 600;
}

.side-label {
  margin: 0 8px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.client-select {
  width: 100%;
  margin: 0 0 16px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
}

.client-select option {
  color: #111111;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.85;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.nav-btn[aria-selected="true"] {
  background: var(--brand);
  font-weight: 500;
  opacity: 1;
}

.soon {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.6;
}

/* Hlavní plocha */

.main {
  min-width: 0;
  padding: 24px 28px 32px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 600;
}

.sub {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

.btn {
  padding: 9px 20px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 1px 3px rgba(31, 79, 204, 0.35);
  font: inherit;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-dark);
}

/* Karty */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(20, 40, 100, 0.06);
}

.box {
  margin-bottom: 20px;
}

.label {
  font-size: 13px;
  color: var(--muted);
}

.value {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.h {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.note {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.empty {
  padding: 40px 18px;
  color: var(--muted);
}

.foot {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Grafy */

.chart {
  position: relative;
  width: 100%;
  min-height: 240px;
}

.tip {
  position: absolute;
  z-index: 2;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(20, 40, 100, 0.18);
  font-size: 13px;
  white-space: pre-line;
  pointer-events: none;
}

/* Tabulky */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.table th {
  font-weight: 500;
  color: var(--brand);
}

.table .left {
  text-align: left;
}

.good {
  color: var(--ok);
}

.bad {
  color: var(--bad);
}

/* Mobil */

@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }

  .side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
