body {
  color: black;
  /* margin: 0; */
  font-family: sans-serif;
}
.container {
  text-align:center;
  margin-left: auto;
  margin-right: auto;
  display: block;
  max-width: 1000px;
}
.section {
  display: inline-block;
  vertical-align: top;
}
.label {
  display: inline-block;
  font-weight: bold;
}
.pm {
  display: inline-block;
  padding: 15px;
  font-size: 2em;
  vertical-align: middle;
  border-radius: 10px;
  min-width: 60px;
}
.green {
  background-color: green;
  color: white;
}
.yellow {
  background-color: yellow;
  color: black;
}
.orange {
  background-color: orange;
  color: black;
}
.red {
  background-color: red;
  color: white;
}
.purple {
  background-color: purple;
  color: white;
}
.dark {
  background-color: rgb(126, 0, 35);
  color: white;
}
.timestamp {
  display: block;
  padding-left: 10px;
  padding-right: 10px;
}
#chart-container {
  height: 60vh;
  min-width: 310px;
  background: #fff;
}
table, td, th {
  border: 1px solid black;
}
.data_table {
  margin: 0 auto;
  border-collapse: collapse;
  white-space: nowrap;
  width: 100%;
}
.list-header {
  background-color: #14387f;
  color: white;
}
.list-row-odd {
  background-color: rgb(240, 240, 240);
}
.list-row-even {
  background-color: rgb(225, 225, 225);
}
.footer {
  text-align:center;
  margin-left: auto;
  margin-right: auto;
  display: block;
  color: gray;
  font-size: small;
}
/* --- Navigation Bar --- */
.nav-classic {
    background-color: #14387f; /* Matches your header blue */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0;
    width: 100%;
    box-sizing: border-box; 
}
.nav-group {
    display: flex;
    height: 100%; /* Fill bar height */
}
.nav-item {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0;
    width: 40vw;
    max-width: 350px;
    justify-content: center;
    display: flex; /* Flex to center text vertically */
    align-items: center;
    transition: background-color 0.2s;
    border-right: 1px solid rgba(255,255,255,0.1); /* Optional separator */
}
/* First item border fix (optional) */
.nav-item:first-child { border-left: 1px solid rgba(255,255,255,0.1); }
.nav-item:hover {
    background-color: rgba(255,255,255,0.15);
}
.nav-item.active {
    background-color: rgba(255,255,255,0.25);
}
/* --- Help Button --- */
.help-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.2s;
}
.help-btn:hover {
    background: white;
    color: #14387f;
    border-color: white;
}
/* --- Modal / Popup --- */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from top, centered horizontally */
    padding: 10px;
    padding-bottom: 0px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    /* Fixed Animation */
    animation: fadeSlideDown 0.3s ease-out;
}
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}
.close-btn:hover { color: black; }
/* Legend Table */
.legend-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}
.legend-table th, .legend-table td {
    border: 1px solid #ddd;
    padding: 8px; /* Slightly tighter padding */
    text-align: center;
}
.legend-table th {
    background-color: #f2f2f2;
    color: #333;
}
.modal-title { margin-top: 0; color: #333; }
/* --- Sticky Table Headers (pro historii) --- */
.data_table thead {
    position: -webkit-sticky; /* Důležitý fix pro Safari na iOS */
    position: sticky;
    top: -1px; /* -1px brání občasným grafickým chybám a mezerám nahoře */
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.data_table thead th {
    background-color: #14387f;
    background-clip: padding-box;
    border-bottom: 1px solid #000;
    position: relative; /* Důležité: umožňuje tlačítku držet se v rohu buňky */
}
/* --- Tlačítko legendy umístěné v levém horním rohu tabulky --- */
.header-help-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.7);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.header-help-btn:hover {
    background: white;
    color: #14387f;
}
