/* HTML */
html{
  background:			linear-gradient(45deg, #770777, #77F777);
  height:				100%;
}
.body-wrapper {
  min-height: 100%; /* займає всю висоту */
  display: flex; /* робимо flex-контейнер */
  flex-direction: column; /* вертикальне розташування */
}
body
{
  flex:						1;      /* займає весь простір */
  max-width:				1400px; /* обмеження ширини */
  margin:					10 auto; /* центрування */
  background:				linear-gradient(45deg, #EECFBA, #C5DDE8);
  background-position:		center;
  background-repeat:		repeat;
  border: 3px solid #777777;
  border-radius: 15px;
  padding: 10px; }
}
main {
  flex: 1;               /* займає весь простір між header і footer */
}
footer {
  margin-top: auto;      /* футер прижимається до низу */
}


/* Link */
a {
 text-decoration:	none; /* Забирає підкреслення для посилань */
 color:				#18901A; /* Колір */
}
a:hover {
 text-decoration:	underline; /* Додаємо підкреслення при наведенні курсора на посилання */
 color:				#9F1332; /* Колір */
# font-weight:		bold;
}

/* TABLES */
.blur table {
	background:			#f5ffff;
	border-collapse:	collapse;
}
.blur th {
# border-top:		1px solid #777777;	
# border-bottom:	1px solid #777777; 
# box-shadow:		inset 0 1px 0 #999999, inset 0 -1px 0 #999999;
# background:		linear-gradient(#9595b6, #5a567f);
 font-size:			16px;
# color:			white;
 padding:			5px 7px;
# position:			relative;
}
.blur th:after {
# content:		"";
 border-top-left-radius:	5px;
 border-top-right-radius:	5px;
 display:		block;
 position:		absolute;
 left:			0;
 top:			25%;
 height:		25%;
 width:			100%;
 background:	linear-gradient(rgba(255, 255, 255, 0), rgba(255,255,255,.08));
}
.blur tr:nth-child(odd) {
 background: #ebf3f9;
}
.blur th:first-child {
# border-left:		1px solid #777777;	
# border-bottom:	1px solid #777777;
# box-shadow:		inset 1px 1px 0 #999999, inset 0 -1px 0 #999999;
}
.blur th:last-child {
# border-right:		1px solid #777777;
# border-bottom:	1px solid #777777;
# box-shadow:		inset -1px 1px 0 #999999, inset 0 -1px 0 #999999;
}
.blur td {
 border-top-left-radius:	5px;
 border-top-right-radius:	5px;
 border:					3px solid #e3eef7;
 font-size:					14px;
 padding:					3px 5px;
# position:					relative;
# transition:				all 0.0s ease;
}
.blur tbody:hover td {
# color:		transparent;
# text-shadow:	0 0 3px #868482;
}
.blur tbody:hover tr:hover td {
# color:		#444000;
# text-shadow:	none;
}

.oper table {
 font-family:		"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
 font-size:			14px;
 border-radius:		10px;
 border-spacing:	0;
 width: 100%;
 table-layout:		fixed; /* Осередки фіксованої ширини */
 page-break-after:	auto;
}
.oper th {
 background:		#42976E;
 color:				white;
 text-shadow:		0 1px 1px #2D2020;
 padding:			3px 5px;
 font-size:			16px;
}
.oper th, td {
 border-style:		solid;
 border-width:		0 1px 1px 0;
# border-color:		white;
}
.oper th:first-child, td:first-child {
}
.oper th:first-child {
 border-top-left-radius:	10px;
}
.oper th:last-child {
 border-top-right-radius:	10px;
# border-right:				none;
}
.oper td {
 font-size:		14px;
 padding:		3px 5px;
 background:	#A9DBB0;
}
.oper tr:last-child td:first-child {
 border-radius: 0 0 0 10px;
}
.oper tr:last-child td:last-child {
 border-radius:	0 0 10px 0;
}
.oper tr td:last-child {
# border-right:	none;
}

/* ВАЛЮТИ */
/* Заголовок */
.chanche-title {
  font-family: "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #2d89ef; /* Metro синій */
  margin-bottom: 10px;
  text-align: center;
}

/* Контейнер */
.chanche-table-container {
  border: 2px solid #2d89ef;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 10px;
  background-color: #ffffff;
  margin: 20px auto;
}

/* Таблиця */
.chanche-table {
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", sans-serif;
  font-size: 14px;
}

/* Рядок */
.chanche-row {
  display: flex;
}

/* Чергування рядків */
.chanche-row:nth-child(even) .chanche-cell {
  background-color: #fafafa;
}

/* Ховер */
.chanche-row:hover .chanche-cell {
  background-color: #e5f3ff;
}

/* Кольори для дельти */
.fg-green { color: #60a917; font-weight: bold; }
.fg-red   { color: #e51400; font-weight: bold; }
.fg-dark  { color: #1d1d1d; }

/* базові клітинки */
.chanche-cell {
  padding: 8px 12px;
  border-bottom: 1px solid #dcdcdc;
  display: flex;
  align-items: center;
}

/* умовне розділення колонок */
.chanche-row .chanche-cell:not(:last-child) {
  border-right: 1px solid #dcdcdc;
}

/* ширина і вирівнювання для даних */
.chanche-cell.cdate         { flex: 0 0 100px;  justify-content: center; }
.chanche-cell.currency-name { flex: 0 0 160px;  justify-content: left; }
.chanche-cell.currency      { flex: 0 0 60px;   justify-content: center; }
.chanche-cell.rate          { flex: 0 0 80px;   justify-content: flex-end;   text-align: right; }
.chanche-cell.delta         { flex: 0 0 100px;  justify-content: flex-start; text-align: left; }
.chanche-cell.test          { flex: 1;          justify-content: center;     text-align: center; }

/* шапка перекриває вирівнювання */
.chanche-header .chanche-cell {
  justify-content: center !important;
  text-align: center !important;
  font-weight: 600;
  background-color: #f0f0f0;
  color: #2d89ef;
  border-bottom: 2px solid #2d89ef;
}

.chanche-header .chanche-cell:not(:last-child) {
#  border-right: 2px solid #2d89ef;
}


.update-excel {
 border: none;
 outline: none;
}

.excel {
 border:			1px solid #CCCCCC;
 border-collapse:	collapse;
 font-family:		sans-serif;
 font-size:			12px;
 color:				#9cf782;
 margin:			0 auto;
}
.excel thead th, table.excel tbody th {
 border:			1px solid #CCCCCC;
 text-align:		center;
 vertical-align:	bottom;
}
.excel tbody th {
 text-align:	center;
 width:			20px;
}
.excel tbody td {
 vertical-align:	bottom;
}
.excel tbody td {
 padding:	0 3px;
 border:	1px solid #EEEEEE;
}

/* DIV */
div.shop{
	max-width:	1364px;
}

#payt2 {display: none;}
[for="payt2"] {
  position:			relative;
  display:			block;
  width:			90px;
  height:			10px;
  padding:			15px;
  border-radius:	50px;
  line-height:		10px;
  color:			#31b3ff;
  text-shadow:		1px 1px 0px rgba(255,255,255,.15);
  background:		rgb(71, 71, 71);
  box-shadow:
   0 1px 0 rgba(255,255,255,.2),
   inset 0 0 0 5px rgb(60, 60, 60),
   inset 0 6px 6px rgba(0,0,0,.5),
   inset 0 -6px 1px rgba(255,255,255,.2);
  cursor:			pointer;
}
[for="payt2"]:before {
  content:	"OFF";
  position:	absolute;
  right:	15px;
  color:	#000;
}
[for="payt2"]:after {
  content:			"";
  position:			absolute;
  left:				5px;
  top:				5px;
  display:			block;
  width:			50px;
  height:			30px;
  border-radius:	50px;
  background:		#ccc linear-gradient(#fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
  transition:		.5s;
}
#payt2:checked ~ [for="payt2"]:after {
  left:		65px;
}
#payt1 {display: none;}
[for="payt1"] {
  position:			relative;
  display:			inline-block;
  width:			40px;
  height:			10px;
  border-radius:	3px;
  background:		rgb(71, 71, 71);
  box-shadow:		inset 0 1px 1px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.2);
  cursor:			pointer;
}
[for="payt1"]:before {
  content:		"";
  position:		absolute;
  left:			-8px;
  top:			-3px;
  display:		block;
  width:		16px;
  height:		16px;
  background:	#dfe5d7 radial-gradient(#dfe5d7, #b3bead 80%, #fff 80%) no-repeat 50% 50%;
  transition:	.5s;
}
#payt1:checked ~ [for="payt1"]:before {
  left:		32px;
}

.clean table {
# background:		#f5ffff;
# border-collapse:	collapse;
 border:			0px;
 color:				white;
}
.clean th {
 border:			0px;
# border-top:		1px solid #777777;	
# border-bottom:	1px solid #777777; 
# box-shadow:		inset 0 1px 0 #999999, inset 0 -1px 0 #999999;
# background:		linear-gradient(#9595b6, #5a567f);
# font-size:		16px;
# color:			white;
# padding:			5px 7px;
# position:			relative;
}
.clean th:after {
 border:		0px;
# content:		"";
# display:		block;
# position:		absolute;
# left:			0;
# top:			25%;
# height:		25%;
# width:		100%;
# background:	linear-gradient(rgba(255, 255, 255, 0), rgba(255,255,255,.08));
}
.clean tr:nth-child(odd) {
 border:		0px;
# background:	#ebf3f9;
}
.clean th:first-child {
 border:			0px;
# border-left:		1px solid #777777;	
# border-bottom:	1px solid #777777;
# box-shadow:		inset 1px 1px 0 #999999, inset 0 -1px 0 #999999;
}
.clean th:last-child {
 border:			0px;
# border-right:		1px solid #777777;
# border-bottom:	1px solid #777777;
# box-shadow:		inset -1px 1px 0 #999999, inset 0 -1px 0 #999999;
}
.clean td {
 border: 0px;
# border-top-left-radius:	5px;
# border-top-right-radius:	5px;
# border:					3px solid #e3eef7;
# font-size:				14px;
# padding:					3px 5px;
# position:					relative;
# transition:				all 0.0s ease;
}
.clean tbody:hover td {
 border:		0px;
# color:		transparent;
# text-shadow:	0 0 3px #868482;
}
.clean tbody:hover tr:hover td {
 border:		0px;
# color:		#444000;
# text-shadow:	none;
}
.select-css { 
 display:				block; 
 font-size:				16px; 
 font-family:			sans-serif; 
 font-weight:			700; 
 color:					#444; 
 line-height:			1.3; 
 padding:				.6em 1.4em .5em .8em; width: 100%; 
 max-width:				100%; 
 box-sizing:			border-box; 
 margin:				0; 
 border:				1px solid #aaa;
 box-shadow:			0 1px 0 1px rgba(0,0,0,.04); 
 border-radius:			.5em;
 -moz-appearance:		none;
 -webkit-appearance:	none;
 appearance:			none;
 background-color:		#fff;
 background-image:		url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'), linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); 
 background-repeat:		no-repeat, repeat;
 background-position:	right .7em top 50%, 0 0;
 background-size:		.65em auto, 100%; 
} 
.select-css::-ms-expand { display:	none; } 
.select-css:hover { border-color:	#888; } 
.select-css:focus { border-color:	#aaa; 
 box-shadow:	0 0 1px 3px rgba(59, 153, 252, .7);
 box-shadow:	0 0 0 3px -moz-mac-focusring; 
 color:			#222;
 outline:		none; 
}
 .select-css option { font-weight:normal; } 
 *[dir="rtl"] .select-css, :root:lang(ar) .select-css, :root:lang(iw) .select-css { 
 background-position:	left .7em top 50%, 0 0; 
 padding:				.6em .8em .5em 1.4em; 
}
textarea {
 resize:	none;
}



/* ============================== */
/* ===== Контейнер топ-меню ===== */
/* ============================== */
.top-menu {
 display: flex;
 flex-wrap: wrap;
 justify-content: flex-start;
# align-items: center;
 align-items: stretch; /* всі кнопки однакової висоти */
 gap: 6px;
 width: 100%;
 max-width: 1400px;
 margin: 8px auto;
 padding: 6px 10px;
 background: #f0f8ff;
 border: 1px solid #0078d7;
 border-radius: 6px;
 box-sizing: border-box;
 font-family: "Segoe UI", Arial, sans-serif;
 text-align: center;          /* центрує кнопки всередині контейнера */
}

/* ===== Кнопки меню ===== */
.top-menu-btn {
  flex: 1 1 120px;
  max-width: 200px;
  min-width: 128px;
  height: 36px;
  display: flex;              /* важливо: flex, а не inline-flex */
  align-items: center;
  gap: 6px;
  background: #0078d7;
  color: #fff;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  white-space: normal;
}

/* Іконка завжди зліва */
.top-menu-btn .btn-icon {
  flex-shrink: 0;             /* іконка не стискається */
  font-size: 14px;
  line-height: 1;
  color: #fff;
}

/* Текст займає решту простору */
.top-menu-btn .btn-text {
  flex: 1;                    /* займає решту простору */
  text-align: left;           /* вирівнювання по лівому краю */
  color: #fff;
  font-weight: 500;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ===== Select для мобільної версії ===== */
.top-menu-select {
 display: none;
 width: 100%;
 padding: 6px 10px;
 font-size: 13px;
 border: 1px solid #0078d7;
 border-radius: 6px;
 background: #fff;
 color: #333;
}

/* ===== Адаптивність ===== */
@media (max-width: 768px) {
 .top-menu {
  flex-direction: column;
 }
 .top-menu-btn {
  display: none;
 }
 .top-menu-select {
  display: block;
 }
}
/* ============================== */
/* ============================== */


/* ============================== */
/* ======= Контейнер меню ======= */
/* ============================== */
/* ===== Контейнер меню ===== */
.top-menu {
 display: flex;
 flex-wrap: wrap;
 justify-content: flex-start;
 align-items: center;
 gap: 6px;
 width: 100%;
 max-width: 1400px;
 margin: 8px auto;
 padding: 6px 10px;
 background: #f0f8ff;
 border: 1px solid #0078d7;
 border-radius: 6px;
 box-sizing: border-box;
 font-family: "Segoe UI", Arial, sans-serif;
 text-align: center;
}

/* ===== Кнопки меню ===== */
.top-menu-btn {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 background: #0078d7;
 color: #fff;
 border-radius: 4px;
 padding: 4px 8px;
 font-size: 13px;
 cursor: pointer;
 transition: background 0.3s;
 width: 128px;
 height: 32px;
 text-decoration: none;
 justify-content: center;
}

.top-menu-btn:hover {
 background: #005a9e;
}

/* Іконка */
.btn-icon {
 font-size: 14px;
 color: #fff;
}

/* Текст */
.btn-text {
 text-align: left;
 color: #fff;
 font-weight: 500;
}

/* Select для мобільної версії */
.top-menu-select {
 display: none;
 width: 100%;
 padding: 6px 10px;
 font-size: 13px;
 border: 1px solid #0078d7;
 border-radius: 6px;
 background: #fff;
 color: #333;
}

/* Адаптивність */
@media (max-width: 768px) {
 .top-menu {
  flex-direction: column;
 }
 .top-menu-btn {
  display: none;
 }
 .top-menu-select {
  display: block;
 }
}
/* ============================== */
/* ============================== */




/* Стрілка (gif) */
.scroll-img {
  position: absolute;          /* позиціонується незалежно від інших елементів */
  top: 50%;                    /* ставимо по вертикалі в центр контейнера */
  transform: translateY(-50%); /* точне вирівнювання по центру (зміщує на половину висоти) */
  right: 0;                    /* початкова позиція — правий край контейнера */
  height: 30px;                /* висота картинки */
  animation: moveArrow 10s linear infinite; /* запускає анімацію: рух за 10 секунд, рівномірно, безкінечно */
}

/* Анімація руху */
@keyframes moveArrow {
  from { right: 0; }           /* старт: стрілка стоїть біля правого краю */
  to   { right: 100%; }        /* кінець: стрілка доходить до лівого краю */
}



.metro-header {
 display: flex;
 justify-content: space-between; /* заголовок зліва, форма справа */
 align-items: center;
 width: 100%;                    /* вписується у body */
 background: linear-gradient(90deg, #2196F3, #673AB7);
 color: #fff;
 padding: 12px 20px;
 border-radius: 12px;            /* узгоджено з body */
 box-shadow: 0 2px 6px rgba(0,0,0,0.2);
 margin: 0 0 20px 0;             /* тільки відступ знизу */
 box-sizing: border-box;         /* щоб падінги не розтягували */
}

.metro-header h1 {
 margin: 0;
 font-family: Segoe UI, Arial, sans-serif;
 font-size: 26px;
 font-weight: bold;
}

.year-form {
 display: flex;
 align-items: center;
 gap: 10px;
}

.year-label {
 font-size: 16px;
 color: #fff;
}

.year-select {
 background: #FF9800;
 color: #fff;
 border: none;
 border-radius: 6px;
 padding: 8px 14px;
 font-size: 15px;
 cursor: pointer;
 transition: background 0.3s, transform 0.2s;
}

.year-select:hover {
 background: #F57C00;
 transform: scale(1.05);
}

.year-select option {
 background: #fff;
 color: #333;
}


/*
.metro-button {
  background:#0078d7;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:8px 16px;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  transition:background 0.3s;
}
.metro-button:hover {
  background:#005a9e;
}
.metro-block {
  max-width: 254px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 6px;
  transition: transform 0.2s, box-shadow 0.3s;
  box-sizing: border-box;
}
.metro-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.metro-block h3 {
  margin: 0 0 4px;
  font-size: 13px; 
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metro-block p {
  margin: 2px 0;
  font-size: 0.9em;
  color: #555;
}
.metro-block table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
.metro-block td {
  padding: 2px 4px;
  text-align: right;
  font-size: 0.9em;
}
.metro-block td:first-child {
  text-align: left;
  color: #555;
}
*/


.metro-block {
 background:#fff;
 border-radius:6px;
 box-shadow:0 2px 6px rgba(0,0,0,0.15);
 padding:16px;
 margin:12px;
 display:inline-block;
 width:280px;
 vertical-align:top;
}

.metro-block h3 {
 margin:0 0 8px;
 font-size:18px;
 color:#333;
}

.metro-block table {
 width:100%;
 border-collapse:collapse;
 margin-top:8px;
}

.metro-block td {
 padding:4px 6px;
 text-align:right;
}

.metro-block td:first-child {
 text-align:left;
 color:#555;
}

.metro-id {
 margin-bottom:6px;
 font-size:14px;
 color:#444;
}

.metro-extra {
 font-weight:bold;
}

.updated-time {
 margin-top:6px;
 font-size:12px;
 color:#777;
}

.metro-header {
 margin:20px 0;
}

.year-form {
 margin-left:20px;
}

.year-label {
 margin-right:8px;
 font-size:14px;
 color:#333;
}

.year-select {
 padding:4px 6px;
 border-radius:4px;
 border:1px solid #ccc;
}

.metro-button {
 background:#0078d7;
 color:#fff;
 border:none;
 border-radius:4px;
 padding:8px 12px;
 cursor:pointer;
 font-size:14px;
}

.metro-button:hover {
 background:#005a9e;
}



.updated-time {
  text-align: right;
  font-size: 0.7em;        /* дрібніший текст */
  color: #777;
  margin-top: 4px;
}

.metro-id {
  text-align: left;
  font-size: 0.7em;
  color: #777;
  margin-top: 2px;
}

.metro-extra {
  text-align: right;
  font-size: 1.4em;
}


/* заголовок сторінки */
.page-title {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #0078d7; /* Metro синій */
  background: #f5f5f5;
  padding: 12px 18px;
  border-left: 5px solid #0078d7; /* акцентна смужка */
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}



/* Верхній блок з gif */
.users-online {
  display: flex;
  justify-content: flex-start;
  align-items: center;        /* правильне вирівнювання */
  position: relative;
  width: 100%;
  min-height: 40px;           /* мінімальна висота замість жорсткої */
  padding: 6px 10px;
  background: #f0f8ff;
  border: 1px solid #0078d7;
  border-radius: 6px;
  margin: 10px 0;
  overflow: hidden;
}

/* Контейнер для кнопок */
.online-container {
  display: flex;
  flex-direction: row;   /* все в один рядок */
  flex-wrap: nowrap;     /* забороняє перенос */
  align-items: center;   /* вирівнює по центру */
  gap: 8px;              /* відступ між написом і кнопками */
  width: 100%;
  overflow-x: auto;      /* якщо не влазить — з’явиться горизонтальний скрол */
}

.online-form {
  display: flex;
  flex-direction: row;   /* кнопки в ряд */
  flex-wrap: nowrap;     /* не переносяться */
  margin: 0;
  padding: 0;
  gap: 6px;              /* відступи між кнопками */
}

.rectangle {
 display: inline-block;
 padding: 4px 8px;
 background-color: #7ee87d;
 color: #14235c;
 border-radius: 5px;
 font-size: 14px;
 font-weight: bold;
 margin: 2px;
}

/* Кнопки */
.metro-online-btn {
  all: unset;
  box-sizing: border-box;     /* щоб padding не обрізав текст */
  background: #657c27;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 4px;
  font-size: 13px;
  font-family: "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: background 0.3s;
  line-height: 1.6;
  white-space: nowrap;        /* текст не переноситься */
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.metro-online-btn:hover {
  background: #005a9e;
}
/* ============================== */
/* ============================== */


/* ============================== */
/* ===== Головний контейнер ===== */
/* ============================== */
.main-container {
  display: flex;               /* робимо flex-контейнер */
  flex-wrap: wrap;             /* дозволяє перенос */
  justify-content: space-between;
  width: 100%;                  /* займає всю доступну ширину */
  max-width: 1400px;           /* обмеження для великих екранів */
  margin: 10px auto;           /* по центру + відступи зверху/знизу */
  gap: 16px;                   /* відстань між блоками */
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;

  /* ідентичний вигляд як .users-online */
  background: #f0f8ff;         /* світлий фон */
  border: 1px solid #0078d7;   /* синя рамка */
  border-radius: 6px;          /* округлені кути */
  padding: 8px 12px;           /* внутрішні відступи */
  align-items: center;         /* вертикальне вирівнювання */
  overflow: hidden;            /* приховує зайве */
}

/* ===== Внутрішні контейнери ===== */
.sub-container {
  flex: 1 1 29%;                /* кожен займає ~29% ширини */
  min-width: 280px;             /* мінімальна ширина перед переносом */
  align-items: center;          /* вертикальне вирівнювання */
  background: #f9fbff;
  border: 1px solid #0078d7;
  border-radius: 6px;
  padding: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

/* ===== Контейнер зміни параметрів графіка ===== */
.chart-form {
  display: flex;
  flex-direction: row;         /* елементи в ряд */
  justify-content: flex-start; /* всі зліва */
  align-items: center;         /* вертикальне вирівнювання */
  width: 100%;
  box-sizing: border-box;
  gap: 40px;                   /* відстань між елементами */
}

/* тільки для sub-container всередині chartForm */
#chartForm .sub-container {
  display: flex;          /* щоб контент вирівнювався */
  align-items: center;    /* вертикальне вирівнювання */
  justify-content: flex-start;
  height: 50px;          /* приклад однакової висоти */
  box-sizing: border-box;
}

.chart-form label {
  flex: 0 0 auto;        /* не розтягувати */
  text-align: left;      /* текст зліва */
}

/* Селектори */
.chart-form label select {
  flex: 0 0 auto;        /* не розтягувати */
#  width: auto;           /* дозволити власну ширину */
  width: 160;            /* дозволити власну ширину */
  padding: 4px 8px;
  border: 1px solid #0078d7;
  border-radius: 4px;
  background: #f9fbff;
  font-size: 14px;
  box-sizing: border-box;
}

/* Range і checkbox */
.chart-form input[type="range"],
.chart-form input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 5px;
}

/* Контейнер перемикача */
.chart-form label.legend-switch {
  flex: 0 0 auto;
  margin-left: 8px;
  text-align: left;
}

/* сам свіч */
.legend-switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 30px;
}

.legend-label {
  flex: 0 0 auto;
  margin-right: 4px;
  font-weight: 500;
}

.legend-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: red;
  transition: .4s;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-switch .slider-text {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
}

/* зелений при включенні */
.legend-switch input:checked + .slider {
  background-color: green;
}

.legend-switch input:checked + .slider:before {
  transform: translateX(32px); /* зсув кружка вправо */
}

/* тільки для блоку з легендою */
#chartForm .sub-container .legend-switch + label {
  margin-left: 12px;  /* відступ між свіча і селектором */
}

/* Текст стану */
.switch-status {
  margin-left: 10px;
  font-weight: bold;
  color: #333;
}


#chart-container {
  width: 100%;
  height: 50vh;
}
#myChart {
  width: 100%;
  height: 100%;
}

/* ===== Контейнер вибору дат ===== */
.select-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.select-date {
  flex: 1 1 auto;
  min-width: 120px;
  align-items: center;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #0078d7;
  border-radius: 6px;
  background: #f9fbff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.select-date:focus {
  border-color: #005a9e;
  box-shadow: 0 0 4px rgba(0,120,215,0.6);
  outline: none;
}

.date-btn {
  flex: 1 1 auto;
  min-width: 100px;
  background: #0078d7;
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.date-btn:hover {
  background: #005a9e;
  transform: scale(1.05);
}

/* ===== Контейнер вибору організації ===== */
.select-org {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.select-org select {
  flex: 1 1 auto;
  min-width: 200px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f9f9f9;
  font-size: 14px;
}

.select-org select:focus {
  border-color: #0078d7;
  box-shadow: 0 0 4px rgba(0,120,215,0.5);
  outline: none;
  background: #fff;
}

.select-org input[type=submit] {
  background: #0078d7;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.select-org input[type=submit]:hover {
  background: #005a9e;
}

/* ===== Резервний контейнер ===== */
.reserve {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-style: italic;
  min-height: 50px;
}

/* ===== Адаптивність ===== */
@media (max-width: 768px) {
  .sub-container {
    flex: 1 1 100%;             /* на телефоні займає всю ширину */
  }
}
/* ============================== */
/* ============================== */




/* Заголовки */
.month-title {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #444;
  background: #e6f2ff; /* легкий синій фон */
  padding: 8px 14px;
  margin: 25px 0 10px;
  border-left: 4px solid #0078d7; /* Metro акцент */
  box-shadow: inset 0 -1px 0 #ccc;
}


/* ТАБЛИЦЯ по місячних сум фірми */
.month-table {
  border-collapse: collapse;
  width: auto;
  margin: 0 0 25px 0;       /* по лівому краю */
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  border-left: 5px solid #0078d7; /* синя лінія зліва */
  box-shadow: 2px 0 4px rgba(0,0,0,0.05); /* легка тінь для акценту */
}

/* Заголовки */
.month-table-head th {
  background: rgba(40, 10, 115, 1.0);
  color: rgba(250, 250, 230, 1.0);
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #ccc;
  width: 120px;
}

/* Дані */
.month-table-data td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  width: 120px;
}

/* Зебра */
.month-table-data:nth-child(even) { background: #fafafa; }
.month-table-data:nth-child(odd) { background: #fff; }

/* Hover */
.month-table-data:hover {
  background: #e6f2ff;
  transform: translateX(3px);
  transition: all 0.2s ease;
}

/* Підсумки */
.month-total {
  background: #0078d7;
  color: #fff;
  font-weight: 600;
}
.month-total td {
  border: 1px solid #0078d7;
  padding: 8px 10px;
  width: 120px;
}
.month-total-title { text-align: left; }
.month-total-sum-bg,
.month-total-sum-cash,
.month-total-sum-card { text-align: right; }



/* Заголовок блоку річних підсумків */
.year-total-title {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #0078d7, #005a9e); /* синій градієнт */
  padding: 12px 18px;
  margin: 35px 0 20px;
  border-left: 6px solid #003f73; /* темніший акцент */
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Таблиця */
.year-total {
  border-collapse: collapse;
  width: auto;
  margin: 0 0 30px 0;           /* по лівому краю */
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  border-left: 5px solid #0078d7; /* синя лінія зліва */
  background: #fdfdfd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Заголовки */
.year-total-head th {
  background: #e9f1fb;          /* світло-синій фон */
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #c5d9f1;
  width: 130px;                 /* трохи ширше для відмінності */
  color: #005a9e;
}

/* Рядок річного підсумку */
.year-total-data {
  background: linear-gradient(90deg, #0078d7, #3399ff); /* градієнт для відділення */
  color: #fff;
  font-weight: 600;
}

.year-total-data td {
  border: 1px solid #0078d7;
  padding: 8px 12px;
  width: 130px;
}

/* Перша клітинка з назвою */
.year-total-data-title {
  text-align: left;
  font-weight: 700;
  background: rgba(0,0,0,0.15); /* легке затемнення для акценту */
  color: #fff;
}

/* Суми */
.year-total-data-sum-bg,
.year-total-data-sum-cash,
.year-total-data-sum-card {
  text-align: right;
}

/* Hover для рядка */
.year-total-data:hover {
  background: linear-gradient(90deg, #3399ff, #0078d7);
  transition: all 0.3s ease;
}


/* Загальні підсумки */
/* Заголовок */
.grand-total-title {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #005a9e, #0078d7); /* темно-синій градієнт */
  padding: 14px 20px;
  margin: 40px 0 20px;
  border-left: 6px solid #003f73;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* Таблиця */
.grand-total-table {
  border-collapse: collapse;
  width: 100%;                /* на всю ширину */
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Заголовки */
.grand-total-table-head th {
  background: #e9f1fb;
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid #c5d9f1;
  color: #005a9e;
}

/* Рядок даних */
.grand-total-data {
  background: linear-gradient(90deg, #0078d7, #3399ff); /* синій градієнт */
  color: #fff;
  font-weight: 600;
}

.grand-total-data td {
  border: 1px solid #0078d7;
  padding: 10px 12px;
  text-align: right;
}

/* Окремі суми */
.grand-total-data-sum-bg,
.grand-total-data-sum-cash,
.grand-total-data-sum-card {
  font-weight: 600;
}

.grand-total-data-sum-all {
  font-weight: 700;
  background: rgba(0,0,0,0.15); /* легке затемнення для акценту */
  color: #fff;
}

/* Повідомлення про відсутність даних */
.no-entries-data {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: red;
  margin: 20px 0;
  font-weight: 700;
  text-align: center;
}


.user-login {
 display: flex;
 flex-direction: column;
 align-items: center;
 margin: 20px auto;
 padding: 15px;
 max-width: 100%;
 border: 1px solid #ccc;
 border-radius: 6px;
 background: #fff8c4;
 font-weight: 700;
 font-family: Segoe UI, Arial, sans-serif;
}

.user-login strong {
 color: #333;
 font-size: 20px;
 margin-bottom: 10px;
}

.no-access-text {
 color: #c00;
 font-weight: bold;
 font-size: 16px;
 background: #ffe5e5;
 padding: 10px;
 border-radius: 4px;
 text-align: center;
}


.select-firm {
  font-family: Arial, sans-serif; /* або інший шрифт */
  font-size: 18px;                /* розмір шрифту */
  color: #333;                    /* колір тексту */
  padding: 4px 8px;               /* внутрішні відступи */
  margin: 2px 0;                  /* зовнішні відступи */
}


.api-error {
  text-align: left;
  color: #b00020;
  border: 1px solid #b00020;
  background: #fff0f0;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}
.api-error-header {
  font-weight: bold;
  margin-bottom: 5px;
}
.api-error-title {
  margin-right: 10px;
}
.api-error-status {
  margin-right: 10px;
}
.api-error-message {
  margin: 5px 0;
  font-style: italic;
}
.api-error-details {
  margin-top: 5px;
  font-size: 90%;
}

.api-success {
  text-align: left;
  color: #006400;
  border: 1px solid #006400;
  background: #f0fff0;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}
.api-success-header {
  font-weight: bold;
  margin-bottom: 5px;
}
.api-success-title {
  margin-right: 10px;
}
.api-success-status {
  margin-right: 10px;
}
.api-success-message {
  margin: 5px 0;
  font-style: italic;
}


