
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
}

/* Left Sidebar */
.sidebar {
    width: 220px;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
}


/*
.sidebar a {
    color: white;
    padding: 15px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #3d566e;
}

.sidebar a:hover {
    background: #1a252f;
}
*/

.sidebar a {
  display: flex;                 /* чтобы текст центрировался */
  align-items: center;
  justify-content: center;
  position: relative;
  height: 50px;
  width: 160px;                  /* чуть больше, чтобы текст помещался */
  clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 15% 50%, 0% 0%);
  margin: 5px 10px;
  text-decoration: none;
}

.sidebar a::before {
  content: "";
  position: absolute;
  inset: 1px;                     /* вместо calc — проще и надёжнее */
  background: #251DA8;
  clip-path: inherit;             /* использовать ту же фигуру */
  z-index: 1;
}

.sidebar a span {
  position: relative;
  z-index: 2;
  color: white;                   /* чтобы читалось */
  font-weight: 600;
  text-align: center;             /* если несколько слов */
  padding: 0 8px;                 /* чтобы не прилипало к краям */
  line-height: 1.2;
}

.link-to-this-page {
  text-decoration: underline;
}

/* Main layout */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.text-to-this-page {
    font-weight: bold;
    text-decoration: underline;
}

.text-to-next-page {
    font-weight: normal;
}


.topbar {
    display: flex;
    justify-content: left;
    align-items: center;
    padding: 15px 20px;
    /*border-bottom: 1px solid #ccc;*/
    position: relative;
    background: white;
    color: #251DA8; /* синий текст */
    font-size: 1.5rem;
    font-weight: bold;
}


/* Region selector dropdown */
.topbar .region-selector select {
    background: #251DA8; /* синий овал */
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    font-size: 1.2rem;
    text-decoration: underline;
}

/*
.selected-region {
    font-size: 18px;
    font-weight: bold;
}
*/
.collection-date {
    position: absolute;
    right: 20px;
    font-size: 16px;
}

/* Center content */
.content {
    padding: 20px;
    text-align: center; /* выравнивание текста по середине */
    color: #251DA8;
}

/*
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table, th, td {
    border: 1px solid #bbb;
}

th, td {
    padding: 10px;
    text-align: left;
}
*/


/* ===== Tables ===== */
table {
    width: 800px; /* фиксированная ширина */
    border-collapse: collapse;
    margin: 15px auto;
    table-layout: fixed; /* равная ширина колонок */
    text-align: center;

}

th, td {
    padding: 10px;
    border: 1px solid #bbb;
    text-align: center;
    border: 2px solid white;
}

thead th {
    background: #251DA8;
    color: white;
    font-weight: bold;
}


/* Header row */

/*
thead th {
    background: #251DA8;
    color: white;
    font-weight: bold;
}
*/

/* First column in body */
tbody td.row-title {
    background: #251DA8; /* синий фон */
    color: white;
    font-weight: bold;
}

/* Other cells */
tbody td:not(.row-title) {
    background: #ecf0f1; /* серый фон */
    color: black;
}

.region-name {
    text-decoration: underline;
}

.link-to-this-page {
    transform: scale(1.1);              /* немного увеличить */
}

.link-to-this-page::before {
    background: #4B94E3 !important;      /* фон светлее (#251DA8 → #3a30d6) */
}


#household-utilities-table tbody tr:nth-child(even) td {
    background: #4B94E3;
}

#fuel-prices-table tbody tr:nth-child(even) td {
    background: #4B94E3;
}

#price-index-table tbody tr:nth-child(even) td {
    background: #4B94E3;
}

#average-salary-table-1 {
    font-size: 1.4rem;
}

#average-salary-table-1 td:first-child{
    background: #251DA8;
    color: white;
    font-weight: bold;
    /*font-size: 1.4rem;*/
}

#average-salary-table-2 td:first-child {
    font-size: 1.2rem;
    background: #4B94E3;
    color: white;
    font-weight: bold;
}

#average-salary-table-3 td:first-child {
    font-size: 1.2rem;
    background: #4B94E3;
    color: white;
    font-weight: bold;
}


/* ===== Table footer ===== */
.table-footer {
    position: relative;
    width: 800px;              /* ровно как таблица */
    margin: 10px auto 25px;
    height: 40px;
}

/* Центр */
.footer-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Справа */
.footer-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #251DA8;
    font-weight: bold;
}

.download-wrapper {
    position: relative;
    display: inline-block;
}

.download-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    overflow: hidden;
    min-width: 160px;
}

.download-option {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    color: #251DA8;
    text-align: center;
}

.download-option:hover {
    background: #4B94E3;
    color: white;
}
