:root {
  --bg: #050712;
  --bg-elevated: #101322;
  --bg-elevated-2: #151829;
  --border-subtle: #272b3f;
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.1);
  --accent-strong: rgba(74, 222, 128, 0.35);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text);
  font-family: var(--font-main);
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.92));
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.brand-text {
  color: #f9fafb;
}

.updated {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Layout */

.container {
  max-width: 1200px;
  margin: 18px auto 40px;
  padding: 0 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.full-width {
  margin-bottom: 18px;
}

/* Cards */

.card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.05), transparent 60%),
              radial-gradient(circle at bottom right, rgba(74, 222, 128, 0.05), transparent 55%),
              var(--bg-elevated);
  border-radius: 14px;
  border: 1px solid rgba(75, 85, 99, 0.5);
  padding: 14px 16px 16px;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.8),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2::before,
.card h3::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

/* Tables */

.table-wrapper {
  max-height: 320px;
  overflow: auto;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid rgba(31, 41, 55, 0.9);
}

/* scrollbars */
.table-wrapper::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(55, 65, 81, 0.9);
  border-radius: 999px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  padding: 6px 8px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  background: rgba(15, 23, 42, 0.98);
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.7);
}

tbody tr:nth-child(even) {
  background: rgba(17, 24, 39, 0.8);
}

tbody tr:hover {
  background: rgba(30, 64, 175, 0.7);
}

td.negative {
  color: #fecaca;
}

td.positive {
  color: #bbf7d0;
}

/* Info card */

.info-card ul {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.info-card li {
  margin-bottom: 3px;
}

.info-ok {
  color: #bbf7d0;
}

.info-warn {
  color: #fed7aa;
}

.info-err {
  color: #fecaca;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 10px 18px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.96);
}

/* Responsive */

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
/* NAV chart container – FIX */
.chart-wrapper {
  position: relative;
  height: 260px;      /* Stała wysokość wykresu */
  max-height: 260px;
  margin-top: 6px;
}

/* Canvas nie może rosnąć jak szalony */
#navChart {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
