body {
	font-family: Arial, sans-serif;
	margin: 0 30px;
	color: #222;
	line-height: 1.4;
}
h2 {
	margin-bottom: 5px;
}
.header-bar {
    z-index: 10;
}
.container {
	max-width: 950px;
	margin: 0 auto;
	padding: 20px 15px 20px 15px;
	box-sizing: border-box;
}
.payment-box {
	display: none;
}
#actions {
	padding-bottom: 70px;
	margin-top: 120px;
}
button {
	padding: 10px 15px;
	margin-right: 8px;
	cursor: pointer;
	font-size: 14px;
	border: none;
}

#invoice-date {
	border-bottom: 1px dotted #ccc;
	padding-bottom: 10px;
}
#archive-select,
#buyer-select, 
#buyerFilter,
#yearFilter {
	height: 36px;
	border-color: #cae2fc;
	margin-left: 5px;
}

#archive-select,
#buyerFilter {
    width: 160px;
}
#add-buyer-btn,
#actions > button:nth-child(1) {
	background: #2196f3;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
#add-buyer-btn:hover,
#actions > button:nth-child(1):hover {
	background: #1c7bc9;
	color: #fff;
}

#actions > button:nth-child(2) {
	background: #8bc34a;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
#actions > button:nth-child(2):hover {
	background: #6e9b3b;
	color: #fff;
}
#actions > button:nth-child(3) {
    opacity: 0.5; /* полупрозрачная */
    cursor: not-allowed; /* курсор "запрещено" */
    background-color: #cccccc; /* серый фон */
    color: #666666; /* серый текст */
    pointer-events: none; /* не реагирует на hover */
    border: 0;
}
#actions > button:nth-child(3):hover {
    background-color: #cccccc !important;
    cursor: not-allowed !important;
}

.btn-pdf, .btn-excel {
  background: none !important;
  border: none;
  padding: 0px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  margin-right: 10px;
}

.btn-pdf:hover, .btn-excel:hover {
  transform: scale(1.1); /* слегка увеличиваем при ховере */
}

.icon-pdf {
    width: 26px;
    height: 26px;
}
.icon-excel {
    width: 29px;
    height: 29px;
}
#delete-invoice-btn {
    display: inline-flex;
}
#delete-invoice-btn,
#delete-buyer-btn {
	color: #ff5722;
	padding: 3px 7px;
	border-radius: 50%;
	width: auto !important;
	transition: background-color 0.5s ease;
}

#delete-invoice-btn:hover,
#delete-buyer-btn:hover {
	color: #ffffff;
	padding: 3px 7px;
	border-radius: 50%;
	width: auto !important;
	background: #ff5722;
	transition: background-color 0.5s ease;
}

#delete-invoice-btn .tooltip-text,
#delete-buyer-btn .tooltip-text {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	background: #000000b0;
	color: #fff;
	padding: 4px 8px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease;
}

#delete-invoice-btn:hover .tooltip-text,
#delete-buyer-btn:hover .tooltip-text {
	opacity: 1;
	visibility: visible;
}
.tooltip-btn {
	position: relative;
	background: #f0f7ff;
}

.tooltip-text {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	background: #000000b0;
	color: #fff;
	padding: 4px 8px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease;
}

.tooltip-btn:hover .tooltip-text {
	opacity: 1;
	visibility: visible;
}
.actions-number {
	width: 18px;
}
.actions-cell {
    width: 30px;
    text-align: center;
    vertical-align: middle;
    padding: 5px 0 0 5px;
}
.add-row {
    background: none;
    color: #2196f3;
}
.add-row:hover {
    opacity: .80;
}
.delete-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    transition: filter 0.2s;
    opacity: .58;
}

.tooltip-btn:hover .delete-icon {
    opacity: 1;
}

#invoice-table > tbody > tr > td.actions-cell > div > button:nth-child(1) {
	color: #8bc34a;
}
#invoice-table > tbody > tr > td.actions-cell > div > button:nth-child(2) {
	color: #f44336;
}
#invoice-table > tbody > tr > td.actions-cell > div > button {
	font-size: 20px;
	padding: 0;
	width: 20px;
	height: 20px;
	align-items: center;
	background: none;
	margin: 0;
	border-radius: 50%;
}
#buyer-block input {
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    width: 100%;
    margin: 2px 0;
    padding: 0;
}


table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}
table th,
table td {
	border: 1px solid #cae2fc;
	padding: 8px;
	text-align: left;
}
table th {
	background: #f0f7ff;
}

/* Убираем стрелки у number-input, оставляя цифры */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

input[type='text'],
input[type='number'] {
	width: 100%;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
}
.actions-quantity {
    width: 58px;
}
.pdv-select {
    border: none;
    background: transparent;
    padding: 5px;
    cursor: pointer;
}
#product-count {
    margin-top: 20px;
}
#pdv-text {
    margin-top: 4px;
    font-size: 13px;
}
.total-block {
    margin-top: 7px;
    text-align: right;
    font-size: 16px;
    font-weight: 400;
}
.total-block-left {
    margin-top: 10px;
}
#grand-total {
	font-weight: bold;
}
.signature {
	margin-top: 40px;
}

.payment-box {
	margin-top: 20px;
	border: 2px solid #000;
	padding: 20px;
}
.payment-title {
	text-align: center;
	font-weight: bold;
	font-size: 18px;
	margin-bottom: 25px;
}
.row {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}
.label {
	width: 160px;
	font-weight: normal;
}
.value {
	font-weight: bold;
}
.box {
	border: 2px solid #000;
	padding: 8px 15px;
	font-weight: bold;
	margin-left: 10px;
}
.iban-box {
	border: 2px solid #000;
	padding: 8px 15px;
	font-weight: bold;
	margin-left: 10px;
	flex-grow: 1;
	max-width: 300px;
}

#select {
	margin-top: 20px;
}
#buyer-block {
	margin-top: 20px;
}

.archive-block {
	margin: 0 0 20px 0;
	float: right;
}
#amount-text {
	display: inline-block;
}
#amount-text::first-letter {
	text-transform: uppercase;
}

.signature-block {
	margin: 60px 0 100px 0;
	font-weight: bold;
	display: flex;
	flex-direction: column;
	height: 70px;
}

.signature-images {
	position: relative;
	font-weight: bold;
	height: 50px;
	line-height: 60px;
}

.signature-img {
	height: 88px;
	position: absolute;
	left: 10%;
	bottom: 40%;
}

.seal-img {
	height: 140px;
	position: absolute;
	left: 19%;
	bottom: -70%;
	transform: rotate(354deg);
	transform-origin: center;
}

.container.hide-signature .signature-images {
	display: none !important;
}

.privacy-policy,
.oferta {
    font-size: 12px;
}

button:disabled {
    opacity: 0.5; /* полупрозрачная */
    cursor: not-allowed; /* курсор "запрещено" */
    background-color: #cccccc; /* серый фон */
    color: #666666; /* серый текст */
    border: 1px solid #999999;
    pointer-events: none; /* не реагирует на hover */
}

/* Стили для блока реквизитов покупателя */
#buyer-block .buyer-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

#buyer-block .buyer-label {
    font-weight: normal;
    text-align: left;
    color: #333;
}

#buyer-block .buyer-input {
    flex: 1;
    border: none;
}

/* Чтобы "Договір:" был выровнен по верху (если текст длинный) */
#buyer-block .contract-row .buyer-label {
    align-self: flex-start;
    margin-top: 10px;
}

#buyer-block #buyer-contract {
       margin-top: 10px; 
}

/* Адаптивность на мобильных устройствах */
@media (max-width: 600px) {
    #buyer-block .buyer-input {
        min-width: auto;
        width: 100%;
    }
}

/* Дополнительно: улучшаем общий вид полей в блоке (название и адрес — на всю ширину) */
#buyer-block > input[type="text"] {
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
}

/* Стили для кнопки "Зберегти зміни реквізитів" */
#save-buyer-changes {
    margin: 20px 0 10px 0;
    padding: 10px 15px;
    background-color: #8bc34a;
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, color 0.2s;
}

#save-buyer-changes:hover {
    background-color: #6e9b3b;
}
.buyer-input::placeholder {
    font-size: 12px;
    opacity: 0.7;
}

/* Футер */
.footer {
    padding-top: 30px;
}
.footer-menu {
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    padding: 15px 0;
    border-top: 1px solid #ccc;
    font-size: 12px;
}
a.footer-contacts span,
a.footer-adres span {
    font-size: 12px;
    color: #555555;
}
.footer-link {
    color: #222222;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #1c7bc9;
    text-decoration: underline;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* === Адаптация === */

@media (max-width: 1023px) {
	body {
		margin: 20px;
	}
	.container {
		padding: 0px 15px 10px 15px;
	}
	.row {
		flex-wrap: wrap;
	}
	.iban-box {
		max-width: none;
		flex: 1;
	}
}


@media (max-width: 767px) {
	body {
		/* margin: 15px; */
	}
	.container {
		padding: 0px 10px;
	}

	h2 {
		font-size: 1.5em;
	}
	#actions button,
	#add-buyer-btn,
	#delete-buyer-btn {
		margin: 8px 0;
	}

	.row {
		flex-direction: column;
		align-items: flex-start;
	}
	.label {
		width: auto;
		margin-bottom: 5px;
	}
	.box,
	.iban-box {
		margin-left: 0;
		width: 100%;
		box-sizing: border-box;
	}
	.iban-box {
		margin-top: 5px;
		font-size: 14px;
	}

	/* Таблица с горизонтальной прокруткой */
	.table-wrapper {
		overflow-x: auto;
		margin-top: 20px;
	}

	table {
		min-width: 700px;
	}

	/* Подпись и печать — один под другим */
	.signature-images {
		/* left: 8%; */
	}

	.signature-img,
	.seal-img {
		max-width: 220px;
	}
	.signature-img {
		left: 18%;
	}

	.seal-img {
		transform: rotate(354deg) scale(0.9);
		left: 32%;
	}
}

@media (max-width: 480px) {
	.container {
		max-width: 480px;
		padding: 0;
		margin-bottom: 100px;
	}
	.signature-wrote {
		font-size: 14px;
	}
	.signature-images {
		/* left: 10%; */
	}
	.signature-img {
		max-width: 180px;
		bottom: 40%;
		left: 20%;
	}
	.seal-img {
		max-width: 200px;
		transform: rotate(354deg) scale(0.8);
		bottom: -60%;
		left: 35%;
		height: 165px;
	}
	.actions-cell {
		width: 100%;
	}
	.btn-pdf, .btn-excel {
    }
    #buyerFilter, #yearFilter {
        float: right;
    }
    #archive-select, #buyerFilter, #yearFilter {
        width: 45%;
    }
    
    #archive-select, #buyer-select, #buyerFilter, #yearFilter {
        margin: 0;
    }
	#actions button,
	#delete-buyer-btn {
		width: 100%;
		margin: 3px 0;
	}
	
	#delete-buyer-btn {
    order: 1;
    position: absolute;
    right: 5%;
	}

	#add-buyer-btn {
		width: 100%;
		margin: 8px 0;
		order: 3;
	}
	.archive-block {
	    width: 100%;
		margin: 3px 0 20px 0;
	}
	#buyer-select {
		margin: 10px 0px 0px 0px;
		width: 100%;
		padding-left: 5px;
		order: 2;
	}
	table {
		min-width: 0;
	}
	.table-wrapper {
		overflow-x: visible;
	}

	#invoice-table thead {
		display: none;
	}

	#invoice-table,
	#invoice-table tbody {
		display: block;
		width: 100%;
	}
    .tooltip-text {
        display: none;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 10px;
    }
    #actions label b {
        display: none;
    }
    #select {
    display: grid;
    }

	/* === КАРТОЧКА === */
	#invoice-table tr {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 5px 12px;
		border: 1px solid #cae2fc;
		border-radius: 8px;
		margin-bottom: 14px;
		padding: 10px 20px 10px 10px;
		background: #fff;

	}

	/* === БАЗОВО ДЛЯ ЯЧЕЕК === */
	#invoice-table td {
		display: block;
		align-items: center;
		justify-content: space-between;
		border: none;
		padding: 5px;
	}

	/* === № СЛЕВА ВВЕРХУ === */
	#invoice-table td:first-child {
		grid-column: 1;
		grid-row: 1;
		font-weight: bold;
		font-size: 16px;
		color: #2196f3;
	}

	/* === ACTIONS СПРАВА ВВЕРХУ === */
	#invoice-table td.actions-cell {
		grid-column: 2;
		grid-row: 1;
		justify-content: flex-end;
		display: flex;
	}

	#invoice-table td.actions-cell > div {
		grid-column: 2;
		grid-row: 1;
		justify-content: flex-end;
		display: flex;
		gap: 5px;
	}

	/* === ОСТАЛЬНЫЕ СТРОКИ === */
	#invoice-table td:not(:first-child):not(.actions-cell) {
		grid-column: 1 / -1;
		color: #555;
	}

	/* === ПОДПИСИ === */
	#invoice-table td::before {
		content: '';
		font-size: 12px;
		color: #7a7a7a;
		flex: 0 0 25%;
		padding-left: 12px;
	}
	#invoice-table td:nth-child(1)::before {
		content: '№';
		color: #2196f3;
		padding: 0;
	}
	#invoice-table td:nth-child(2)::before {
		content: 'Найменування';
	}
	#invoice-table td:nth-child(3)::before {
		content: 'Кіл-сть';
	}
	#invoice-table td:nth-child(4)::before {
		content: 'Од.';
	}
	#invoice-table td:nth-child(4) {
		display: none;
	}
	#invoice-table td:nth-child(5)::before {
		content: 'Ціна';
	}

	#invoice-table td:nth-child(6)::before {
		content: 'Сума';
		font-size: 14px;
	}
	#invoice-table td:nth-child(6) {
		display: flex;
	}

	/* === СУММА === */
	#invoice-table td.sum {
		border-top: 2px solid #2196f3;
		padding-top: 12px;
		font-weight: 600;
		margin-top: 10px;
	}

	/* === INPUT === */
	#invoice-table input {
		width: 100%;
		border: 1px dotted #ededed;
		padding: 10px 0 10px 10px;
		margin-top: 5px;
	}
}


@media print {
    body {
        margin: 40px;
        padding: 0;
    }
    @page {
        margin: 0.5cm; /* или 0, если хочешь совсем без полей */
        size: A4 portrait;
    }
	#actions,
	#select,
	#toggle-signature,
	#buyer-select,
	#login-icon,
	.header-bar,
	.header-personal-bar,
	.header-line,
	.code,
	.archive-block,
	.actions-cell,
	.tax-vat,
	.footer {
		display: none !important;
	}
	button {
		display: none !important;
	}
	input {
		border: none !important;
	}
	input[type='text'],
	input[type='number'],
	#buyer-block,
	#buyer-block > input[type="text"],
	#buyer-block input,
	#buyer-block .buyer-row,
	#pdv-text {
		border: none;
		outline: none;
		background: transparent;
		font-size: 12px;
	}
	.container {
		max-width: none;
		padding: 0;
		font-size: 12px;
	}
	.payment-box {
		display: none;
	}
	#actions {
		margin-bottom: 20px;
	}
	.payment-title {
		font-size: 14px;
	}
	table th,
	table td {
		border: 1px solid #bbbbbb;
	}
	#invoice-table {
		width: 100%;
	}
	.table-wrapper {
		display: table;
	}
	.table {
		min-width: auto;
		width: 100%;
	}
	.actions-quantity {
		width: 60px;
	}
	#invoice-table > tbody > tr > td:nth-child(5) > input[type='number'] {
		width: 75px;
	}
	#invoice-table > tbody > tr > td:nth-child(5) {
	}
	.total-block {
        font-size: 12px;
	}
	.signature-wrote {
		font-size: 14px;
	}
	.signature-block {
    margin: 60px 0 0px 0;
	}
	.signature-images {
		position: relative;
		font-weight: bold;
		height: 50px;
		line-height: 60px;
	}

	.signature-img {
		height: 80px;
		position: absolute;
		left: 11%;
		bottom: 44%;
	}

	.seal-img {
		height: 145px;
		position: absolute;
		left: 20%;
		bottom: -100%;
		transform: rotate(354deg);
		transform-origin: center;
	}
}

/* promo.css */
.promo-button {
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.18;
    background: linear-gradient(90deg, #f7c86d, #76baf1, #a75fff, #ff60df);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    background-size: 300% 100%;
    animation: gradientFlow 8s ease-in-out infinite;
}

.promo-button:hover {
    animation-duration: 3s;
    filter: brightness(1.15);

}

#promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none; /* по умолчанию скрыто */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#promo-modal.show {
    display: flex; /* открыто */
    opacity: 1;
    visibility: visible;
}

/* Модальне вікно */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {max-width: 800px;width: 90%;max-height: 90vh;overflow-y: auto;border-radius: 16px;box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);padding: 40px;text-align: left;position: relative;background: rgba(15, 23, 42, 0.92);backdrop-filter: blur(16px) saturate(160%);-webkit-backdrop-filter: blur(16px) saturate(160%);}

/* Заголовки */
.modal-content h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 1.4rem 0;
  padding-right: 80px; /* місце під кнопку закриття */

  /* Переливчастий градієнт */
  background: linear-gradient(90deg, #fc84e4, #76baf1, #2196f3, #fc84e4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;

  /* Анімація */
  background-size: 300% 100%;
  animation: gradientFlow 8s ease-in-out infinite;
}

/* Повільніша, спокійніша версія (рекомендую для основного заголовка) */
.modal-content h1.slow {
  background-size: 400% 100%;
  animation-duration: 12s;
}

/* Швидша версія (якщо хочеш більше динаміки) */
.modal-content h1.fast {
  background-size: 200% 100%;
  animation-duration: 5s;
}

/* Сама анімація */
@keyframes gradientFlow {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* На випадок, якщо користувач увімкнув reduced motion (доступність) */
@media (prefers-reduced-motion: reduce) {
  .modal-content h1 {
    animation: none !important;
    background: linear-gradient(90deg, #fc84e4, #76baf1, #2196f3) !important;
  }
}

/* Опціонально: при наведенні курсора — трохи прискорюється */
.modal-content h1:hover {
  animation-duration: 4s;
  animation-timing-function: linear;
}

.modal-content h2 {
  font-size: 1.6rem;
  font-weight: 680;
  color: #ffffff;
  margin: 2.2rem 0 1rem;
  position: relative;
  padding-left: 0;
}

.modal-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 175px;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  border-radius: 3px;
}

.modal-content h3 {
  font-size: 1.32rem;
  font-weight: 650;
  color: #accef8;
  margin: 1.6rem 0 0.9rem;
}

/* Текст */
.modal-content p {
  font-size: 1.08rem;
  line-height: 1.78;
  color: #cbd5e1;
  margin: 0 0 1.3rem;
}

.modal-content strong {
  color: #accef8;
  font-weight: 620;
}

/* Список */
.modal-content ul {
  list-style: none;
  padding-left: 0;
  margin: 1.2rem 0 2rem;
}

.modal-content ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 0.9rem;
  font-size: 1.07rem;
  color: #cbd5e1;
}

.modal-content ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #a78bfa;
  font-size: 1.3rem;
  line-height: 1;
  top: 2px;
}

/* Акцентний блок в кінці */
.modal-content p[style*="text-align: center"] {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 16px;
  padding: 28px 24px;
  font-size: 1.18rem !important;
  line-height: 1.65;
  color: #ffffff;
  margin: 2.5rem auto 1.8rem;
  max-width: 640px;
}

/* Фінальний великий заголовок */
.modal-content h1:last-child {
  text-align: center;
  font-size: 2.0rem;
  margin: 2.8rem 0 1rem;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}
@media (max-width: 560px) {
    .promo-button{
        display: none;
    }
}

/* login.css */
/* Блок для позиционирования иконки входа */
.login {
    display: flex;
    right: 0;
    position: absolute;
    top: 0;
}

/* Иконка входа (ключик) */
#login-icon {
    cursor: pointer;
    display: flex;
    float: right;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

/* Эффект наведения на иконку входа */
#login-icon:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
/* Иконка смены пароля (ключик) */
#password-icon {
    cursor: pointer;
    display: flex;
    float: right;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Эффект наведения на иконку входа */
#password-icon:hover {
    background: white;
    transform: scale(1.1);
}

/* Основной блок верхней панели (код, демо, кнопки) */
.code {
position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 998;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    max-width: 950px;
    margin: 0 auto;
    box-sizing: border-box;
    gap: 20px;
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-dropdown a {
    display: block;
    padding: 12px 20px 12px 20px;
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.user-menu-dropdown a::before {
    content: attr(data-icon); /* берёт иконку из data-icon */
    position: absolute;
    left: 20px; /* расстояние от левого края */
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px; /* размер иконки */
}

.user-menu-dropdown a:hover {
    background: #f0f7ff;
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 7px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0; /* скрыто по умолчанию */
    visibility: hidden; /* скрыто */
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}
.user-menu-dropdown svg {
    stroke: #2196f3; /* цвет как текст */
    margin: 0px 7px -6px 0; /* отступ от текста */
    width: 20px;
    height: 22px;
}
.user-menu-dropdown.open {
    opacity: 1; /* видно */
    visibility: visible;
    transform: translateY(0);
}



.user-menu-trigger {
    cursor: pointer;
    display: flex;
    float: right;
    font-size: 26px;
    background: rgba(255, 255, 255, 0.9);
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.user-menu-trigger:hover {

    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}


/* Стили для текста "КОД:" и "ДЕМО РАХУНОК" */
a.code-label,
.code span {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 7px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Стили для кликабельных элементов (КОД, ДЕМО) */
a.code-label,
.code-label,
.demo-label {
    color: white !important;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}

/* Эффект наведения и активного состояния для кликабельных элементов */
.code-label:hover,
.code-label:active,
.demo-label:hover,
.demo-label:active {
    color: white !important;
    opacity: 0.95;
}

a.code-label:hover,
a.code-label:active {
    color: white !important;
    background: linear-gradient(135deg, #153366, #112c5c); 
}

/* Модальное окно логина */
#login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

/* Контент модального окна логина */
.login-modal-content {
    background: #f6f7fc;
    margin: 15% auto;
    padding: 10px 30px 40px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 350px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

/* Кнопка закрытия модалки */
.close-btn {
    color: #cecece;
    float: right;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

/* Эффект наведения на кнопку закрытия */
.close-btn:hover {
    color: #000;
}

/* Форма логина */
#login-form,
#change-password-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}
#password-message {
    color: red;
    padding-top: 10px;
    font-size: 12px;
}

/* Группа ввода с плавающим лейблом */
.input-group {
    position: relative;
}

/* Поле ввода */
.input-group input {
    width: 100%;
    padding: 12px 12px 12px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: transparent;
    transition: border 0.3s;
    box-sizing: border-box;
}

/* Плавающий лейбл */
.input-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 0 6px;
    background: #f6f7fc;
}

/* Состояние фокуса и заполненного поля */
.input-group input:focus,
.input-group input:valid {
    border-color: #8bc34a;
    outline: none;
}

/* Подъём лейбла при фокусе или заполнении */
.input-group input:focus + label,
.input-group input:valid + label {
    top: 0;
    font-size: 12px;
    color: #8bc34a;
    font-weight: 500;
}

/* Группа чекбокса */
.checkbox-group {
    margin: -10px;
    text-align: left;
    padding-left: 12px;
}

/* Кастомный чекбокс */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

/* Скрываем стандартный чекбокс */
.checkbox-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Квадратик чекбокса */
.checkbox-mark {
    width: 15px;
    height: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

/* Галочка при выборе */
.custom-checkbox input:checked + .checkbox-mark {
    background: #4caf50;
    border-color: #4caf50;
}

/* Галочка (псевдоэлемент) */
.custom-checkbox input:checked + .checkbox-mark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Эффект наведения на чекбокс */
.custom-checkbox:hover .checkbox-mark {
    border-color: #4caf50;
}

/* Фокус для клавиатуры */
.custom-checkbox input:focus-visible + .checkbox-mark {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* Текст чекбокса */
.checkbox-text {
    line-height: 1.4;
}

/* Кнопка формы логина */
#login-form button,
#change-password-form button {
    background-color: #2196f3;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    margin: 10px 0 0 0;
}

/* Эффект наведения на кнопку логина */
#login-form button:hover,
#change-password-form button:hover {
    background-color: #8bc34a;
}

/* Анимация появления модалки */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Анимация слайда модалки */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Основной хедер */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.header-personal-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

/* Внутренний контейнер хедера */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
    padding: 0 15px;
    z-index: 998;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    max-width: 950px;
    margin: 0 auto;
    box-sizing: border-box;
    gap: 20px;
}

/* Левая часть — DEMO */
.header-left {
    flex: 0 0 auto;
}

/* Плашка DEMO */
.demo-label {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Контейнер бегущей строки */
.marquee-container {
    flex: 1;
    overflow: hidden;
    /* margin: 0 10px; */
    position: relative;
}

/* Бегущая строка */
.marquee {
    display: flex;
    /* white-space: nowrap; */
    float: right;
}

/* Текст бегущей строки */
.marquee span {
    font-size: 15px;
    color: rgb(37 72 135);
    padding-right: 30px;
    background: none;
    box-shadow: none;
}

/* Анимация бегущей строки */
@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Правая часть — иконка входа */
.header-right {
    flex: 0 0 auto;
    position: absolute;
    display: flex;
    right: 0;
    padding-right: 15px;
}

/* Эффект наведения на иконку входа в хедере */
#login-icon:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Ссылки на телефоны */
.phone-link {
    color: inherit;
    text-decoration: none;
    margin: 0px 10px;
    font-weight: 400;
}

/* Эффект наведения на телефоны */
.phone-link:hover {
    text-decoration: underline;
}

/* Линия под хедером */
.header-line {
    margin-top: 100px;
}

/* Кнопка оплаты в хедере */
.payment-header-btn {
    background: #ff9b06;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-left: 20px;
}
#open-payment-modal {
    position: absolute;
    display: flex;
    right: 70px;
}

/* Эффект наведения на кнопку оплаты */
.payment-header-btn:hover {
    background: #ea8d03;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#change-password-modal {
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 10px;
}

.green { background: #4CAF50; color: white; }
.red { background: #f44336; color: white; }

.modal-message {
    margin-top: 15px;
    color: red;
    min-height: 20px;
}





/* Responsive для мобильных */
@media (max-width: 600px) {
    .payment-modal-content {
        margin: 30% auto;
        width: 80%;
    }

    .marquee-container {
    }

    .phone-link {
        color: inherit;
    }
    .demo-label {
        font-size: 14px;
        padding: 15px 15px;
    }
    
    #open-payment-modal {
        padding: 15px 15px;
        font-size: 12px;
        right: 60px;
}
}

/* Цвет телефонов на мобильных */
@media (max-width: 768px) {
    .marquee span {
        font-size: 12px;
        padding-right: 10px;
    }

    .marquee {
    }
    .phone-link {
        color: inherit;
    }
}

/* Модалка оплаты — полностью новые классы */
.payment-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.5);
    animation: fadeIn 0.3s ease-in-out;
}

/* Контент модалки оплаты */
.payment-content {
    background: #f6f7fc;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 350px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

/* Крестик закрытия модалки оплаты */
.payment-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Эффект наведения на крестик оплаты */
.payment-close:hover {
    color: #000;
}

/* Форма оплаты */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
    z-index: 1;
    position: relative;
}

/* Кнопка оплаты в модалке */
.payment-form button {
    background-color: #4CAF50;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    width: 100%;
    margin: 10px 0;
}

/* Эффект наведения на кнопку оплаты */
.payment-form button:hover {
    background-color: #45a049;
}

/* Группа ввода для оплаты */
.payment-group {
    position: relative;
}

/* Поле ввода в оплате */
.payment-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: transparent;
    box-sizing: border-box;
    transition: border 0.3s;
}

/* Плавающий лейбл в оплате */
.payment-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #f6f7fc;
    padding: 0 8px;
}

/* Фокус и заполненное поле в оплате */
.payment-group input:focus,
.payment-group input:not(:placeholder-shown) {
    border-color: #4CAF50;
    outline: none;
}

/* Подъём лейбла в оплате */
.payment-group input:focus + label,
.payment-group input:not(:placeholder-shown) + label {
    top: 0px;
    font-size: 12px;
    color: #4CAF50;
    font-weight: 600;
}

/* Неактивная кнопка оплаты */
#payBtn:disabled {
    background-color: #bfc5cc;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Активная кнопка оплаты + hover */
#payBtn:not(:disabled):hover {
    background-color: #165fb3;
}

/* Красный текст в модалке оплаты (третье сообщение) */
#payment-modal > div > span:nth-child(3) {
    color: #ff9b06;
}

#payment-modal h3 {
    margin: 18px 0 5px 0;
}