@font-face {
	font-family: 'Roboto';
	src: url('../fonts/Roboto-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Roboto';
	src: url('../fonts/Roboto-Italic.woff2') format('woff2');
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'Roboto';
	src: url('../fonts/Roboto-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

* {
	padding: 0px;
	margin: 0px;
	border: none;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

a {
	color: inherit;
}

a,
a:link,
a:visited {
	text-decoration: none;
}

a:hover {
	text-decoration: none;
}

aside,
nav,
footer,
header,
section,
main {
	display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
	font-size: inherit;
	font-weight: inherit;
}

ul,
ul li {
	list-style: none;
}

img {
	vertical-align: top;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

address {
	font-style: normal;
}

input,
textarea,
button,
select {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	background-color: transparent;
}

input::-ms-clear {
	display: none;
}

button,
input[type='submit'] {
	display: inline-block;
	box-shadow: none;
	background-color: transparent;
	background: none;
	cursor: pointer;
}

input:focus,
input:active,
button:focus,
button:active {
	outline: none;
}

button::-moz-focus-inner {
	padding: 0;
	border: 0;
}

label {
	cursor: pointer;
}

legend {
	display: block;
}

input[type='file'] {
	max-width: 100%;
}

html {
	font: 400 var(--font-size-default) / 1.5 Roboto, Helvetica, Arial, sans-serif;
}

body {
	color: var(--color-text-primary);
}

:root {
	--color-background-site: #bfdcc0;
	--color-background-secondary: #f1f1f1;
	--color-primary: #2b579a;
	--color-text-primary: #404040;
	--color-text-secondary: #616161;
	--color-icon: #204072;

	--color-background-window: #fff;
	--color-border-window: #c3c3c3;
	--color-table-header: #f1f1f1;
	--color-table-background: #fafafa;
	--color-table-border: #e7e7e7;
	--color-table-border-hover: #d9d9d9;

	--color-button-primary-hover: #d5e1f2;
	--color-button-primary-border: #a3bde3;
	--color-button-primary-border-hover: #ababab;

	--color-button-secondary-background: #337ab7;
	--color-button-secondary-border: #2e6da4;
	--color-button-secondary-hover-background: #286090;
	--color-button-secondary-hover-border: #204d74;

	--color-button-tertiary-background: #f5f5f5;
	--color-button-tertiary-hover: #3e6db6;

	--font-size-default: 12px;
	--padding-default: 5px;
}

.disabled {
	pointer-events: none;
}

.content {
	position: relative;
	flex-grow: 1;
	background-color: var(--color-background-window);
	overflow-x: hidden;
}

.container {
	background-color: var(--color-background-site);
	display: flex;
	gap: 5px;
	height: 100dvh;
	padding: var(--padding-default);
	overflow: hidden;
	flex-direction: column;
}

.container.container--without-menu {
	padding: 0;
}

.container.container--without-menu .content {
	background-color: var(--color-background-secondary);
}

.button {
	width: 75px;
	height: 28px;
	padding: 4px 5px;
	border-radius: 0.25rem;
	border: 1px solid var(--color-button-primary-border-hover);
	background-color: var(--color-button-tertiary-background);
	transition: all 250ms;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
}

.button:hover {
	background-color: var(--color-button-primary-hover);
	box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px 0px;
	border-color: var(--color-button-primary-border);
}

.button:focus-visible {
	border-color: var(--color-primary);
}

.button:active {
	background-color: var(--color-button-primary-border);
	border-color: var(--color-primary);
}

.button:disabled,
.button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.select {
	width: 100%;
	position: relative;
}

.select__control {
	height: 28px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 4px 38px 4px 5px;
	border: 1px solid var(--color-border-window);
	background: var(--color-background-window);
	transition: border-color 0.3s;
	outline: none;
	position: relative;
	cursor: pointer;
}

.select__control:focus {
	border-color: var(--color-primary);
}

.select__control .select__arrow {
	position: absolute;
	top: 6px;
	right: 5px;
	width: 12px;
	height: 12px;
	opacity: 0.5;
}

.select__text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.select__placeholder {
	color: var(--color-text-secondary);
	opacity: 0.5;
}

input::placeholder,
textarea::placeholder {
	color: var(--color-text-secondary);
	opacity: 0.5;
}

.select__dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background: var(--color-background-window);
	border: 1px solid var(--color-border-window);
	border-top: none;
	z-index: 10;
	max-height: 200px;
	overflow-y: auto;
}

.text-bold {
	font-weight: 700;
}

.select.active .select__dropdown {
	display: block;
}

.select__option {
	width: 100%;
	padding: 4px 5px;
	cursor: pointer;
	box-sizing: border-box;
}

.select__option:hover {
	background: var(--color-background-secondary);
}

.select__option:focus,
.select__option:focus-visible {
	border: 1px solid var(--color-primary);
	outline: none;
	padding: 3px 4px;
}

.select__control .select__clear {
	position: absolute;
	width: 28px;
	height: 28px;
	padding: 8px;
	right: 18px;
	opacity: 0.5;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	color: var(--color-text-secondary);
	display: none;
}

.select.has-value .select__clear {
	display: flex;
}

.input-container {
	position: relative;
	display: inline-block;
	width: 100%;
}

.input-container input {
	position: relative;
	box-sizing: border-box;
}

.input-container .clear-button {
	position: absolute;
	cursor: pointer;
	font-size: 16px;
	color: var(--color-text-secondary);
	display: none;
	height: 28px;
	width: 28px;
	opacity: 0.5;
	padding: 8px;
	right: 0px;
	top: 50%;
	transform: translateY(-50%);
	align-items: center;
	justify-content: center;
}

.input-container input.filled + .clear-button {
	display: flex;
}

.text-green {
	color: #1e7e34;
}
.text-red {
	color: #d32f2f;
}

.text-blue {
	color: #004085;
}

.back-green {
	background-color: #34c759;
	color: black;
}

.back-red {
	background-color: #ff2f2f;
	color: #222;
}

.collapse-btn {
	position: absolute;
	right: 5px;
	top: 2px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 2;
	width: 24px;
	height: 24px;
	font-size: 14px;
	opacity: 0.8;
	color: white;
}

.collapse-btn:hover {
	opacity: 1;
}

.collapsed-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 30px;
	height: 100%;
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	background-color: var(--color-primary);
	color: white;
	transition: all 0.3s ease;
	z-index: 3;
}

.vertical-text {
	writing-mode: vertical-lr;
	text-orientation: mixed;
}

.expand-btn {
	left: 50%;
	transform: translateX(-50%);
}

.resize-handle {
	position: absolute;
	right: -10px;
	top: 0;
	width: 10px;
	height: 100%;
	cursor: ew-resize;
	touch-action: none;
	z-index: 10;
}

@media (max-width: 768px) {
	:root {
		--font-size-default: 14px;
		--padding-default: 0px;
	}

	.container {
		gap: 0;
	}
}

.sidebar-nav {
	width: 100%;
	flex-shrink: 0;
	background-color: #f5f7fa;
	border-right: 1px solid #e1e6eb;
	border-top: 1px solid #e1e6eb;
}

.nav-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0px, 1fr));
}

.nav-item {
	text-align: center;
	font-weight: 500;
	font-size: 14px;
	border-right: 1px solid #e1e6eb;
	border-bottom: 1px solid #e1e6eb;
}

.nav-list img {
	display: none;
}

.nav-item a {
	display: block;
	padding: 6px 20px;
	color: #404040;
	text-decoration: none;
	transition: background-color 0.3s;
	padding-left: 23px;
}

.nav-item a:hover {
	background-color: #e6eef7;
}

.nav-item a:focus-visible {
	padding-left: 20px;
	border-left: 3px solid #2b579a;
}

.nav-item a:focus {
	background-color: #dfe7f2;
	outline: none;
}

.nav-item.active a {
	background-color: #2b579a;
	color: white;
	font-weight: 500;
}

@media (max-width: 1024px) {
	.nav-list {
		grid-template-columns: repeat(4, minmax(auto, 1fr)) !important;
		grid-template-rows: auto;
	}

	.nav-item:last-child {
		border-right: 1px solid #e1e6eb;
	}
}

@media (max-width: 700px) {
	.nav-list {
		grid-template-columns: repeat(3, minmax(auto, 1fr)) !important;
	}
}

@media (max-width: 525px) {
	html,
	body,
	* {
		user-select: none;
		-webkit-user-select: none;
		-ms-user-select: none;
	}
}

@media (max-width: 600px) {
	.nav-list {
		grid-template-columns: repeat(10, minmax(auto, 1fr)) !important;
		direction: rtl;
	}
	.nav-list > * {
		direction: ltr;
	}
	.nav-list img {
		display: inline-block;
	}

	.nav-item a {
		padding: 12px 0;
	}
	.nav-item a span {
		display: none;
	}

	.nav-item .icon {
		width: 18px;
		height: 18px;
	}

	.nav-item.active a {
		background-color: #4f8ad9;
	}
}

#suppliers-account-container .table-container {
	border: none;
}

#suppliers-account-container .table {
	border: 1px solid var(--color-border-window);
}

.table__dropdown {
	position: absolute;
	background-color: #fff;
	border: 1px solid #e1e6eb;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	min-width: 120px;
}

.table__dropdown-item {
	padding: 8px 12px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.table__dropdown-item:hover {
	background-color: #f5f7fa;
}

.table__submenu {
	position: absolute;
	background-color: #fff;
	border: 1px solid #e1e6eb;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	z-index: 1001;
	min-width: 200px;
}

.toast {
	position: fixed;
	top: 32px;
	right: 32px;
	z-index: 9999;
	background: #f44336;
	color: #fff;
	padding: 16px 24px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	font-size: 16px;
	gap: 12px;
	min-width: 220px;
	max-width: 400px;
	transition: left 0.3s, right 0.3s, top 0.3s, transform 0.3s;
}
.toast__icon {
	margin-right: 8px;
	font-size: 20px;
	width: 32px;
	height: 32px;
}
.toast__message {
	flex: 1;
}
.toast__close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	margin-left: 12px;
}

.toast.toast--success {
	background: #4caf50;
}

@media (max-width: 500px) {
	.toast {
		left: 16px;
		right: 16px;
		width: calc(100% - 32px);
		padding: 12px 16px;
	}
}

.debtors-office-list {
	list-style: none;
	padding: 0;
	margin: 0;
	background: var(--color-background-window, #fff);
	border: 1px solid var(--color-border-window, #e1e6eb);
	max-width: 610px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	margin-bottom: 8px;
}
.debtors-office-list__item {
	border-bottom: 1px solid var(--color-border-window, #e1e6eb);
	padding: 0;
}
.debtors-office-list__item:last-child {
	border-bottom: none;
}
.debtors-office-list__row.row-focused {
	border-left: 4px solid #2b579a;
}

.debtors-office-list__row {
	display: flex;
	align-items: center;
	padding: 0 4px;
	border-left: 4px solid transparent;
	height: 28px;
	cursor: pointer;
	background: var(--color-background-window, #fff);
	transition: background 0.15s;
}
.debtors-office-list__row:hover {
	background: var(--color-table-background, #f5f7fa);
}
.debtors-office-list__row-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px;
	height: 28px;
	cursor: pointer;
	transition: background 0.15s;
}
.debtors-office-list__row-item,
.debtors-office-list__row-item * {
	user-select: none;
}
.debtors-office-list__row-item:hover {
	background: #fff;
}
.debtors-office-list__toggle {
	background: none;
	border: none;
	font-size: 15px;
	color: var(--color-text-secondary, #888);
	margin-right: 6px;
	width: 22px;
	height: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
	transition: transform 0.2s ease-in-out;
	padding: 0;
}
.debtors-office-list__toggle.open {
	color: var(--color-primary, #2b579a);
	transform: rotate(45deg);
}
.debtors-office-list__header {
	font-weight: 600;
	color: #2c3e50;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 10px;
}
.debtors-office__header {
	font-size: 16px;
}
.debtors-office__header--top {
	border-top: 1px solid var(--color-border-window, #e1e6eb);
}
.debtors-office-list__title {
	flex: 1;
	font-weight: 500;
	color: var(--color-text-primary, #222);
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.debtors-office-list__amount {
	min-width: 70px;
	text-align: right;
	font-weight: 600;
	font-size: 13px;
}

.debtors-office-list__details {
	display: none;
	background: var(--color-table-background, #f5f7fa);
	padding: 4px 28px;
	font-size: 12px;
	color: var(--color-text-secondary, #666);
}
.debtors-office-list__details.open {
	display: block;
}

.debtors-details-title {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 10px 0 10px 0;
	color: #2d3a4a;
	letter-spacing: 0.01em;
	padding-left: 2px;
	border-bottom: 1px solid #e5e8ed;
}

.stats-container .select {
	max-width: 300px;
	margin-bottom: 8px;
}

.stats-container {
	min-height: 301px;
	position: relative;
	max-height: 301px;
	overflow-y: auto;
	border-top: 1px solid var(--color-border-window);
	border-bottom: 1px solid var(--color-border-window);
	flex: 0 0 auto;
}

#cash_flow-container #statsChart {
	max-height: 260px;
	padding-right: 10px;
}

#cash_flow-container .stats-container {
	border: 1px solid var(--color-border-window);
}

.summary-container {
	min-height: 300px;
	position: relative;
	max-height: 300px;
	overflow-y: auto;
	border-top: 1px solid var(--color-border-window);
	border-bottom: 1px solid var(--color-border-window);
	flex: 0 0 auto;
}

#debtors-container {
	max-height: 100%;
}

.debtors-data {
	flex: 0 0 auto;
	overflow-y: auto;
	width: 50%;
}

@media (max-width: 600px) {
	.stats-container .select {
		max-width: 100%;
		width: 100%;
	}

	#cash_flow-container #statsChart {
		max-height: 220px;
	}

	.stats-container {
		min-height: 220px;
	}
}

@media (max-width: 600px) {
	#cash_flow-container #statsChart {
		max-height: 200px;
	}
}

.icon {
	width: 12px;
	height: 12px;
}

.debtors-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 610px;
	padding-right: 10px;
}

.debtors-total {
	font-weight: 700;
}

/* #balance-container .debtors-header {
	border-bottom: 1px solid var(--color-border-window, #e1e6eb);
} */

#balance-container .debtors-office-list__details {
	padding: 0;
	border: 1px solid var(--color-table-border);
}

#balance-container .debtors-office-list__row-item {
	border-bottom: 1px solid var(--color-table-border);
}

#debtors-container.page-table-container {
	flex-direction: row;
}

#debtors-container .stats-container {
	width: 50%;
	max-height: 100%;
	border: none;
}

#debtors-container .debtors-data,
#debtors-container .stats-container {
	padding: 10px 15px;
}

#debtors-container .debtors-header,
#debtors-container .debtors-office-list {
	max-width: 100%;
}

#debtors-container .debtors-data {
	border-right: 1px solid var(--color-border-window);
}

@media (max-width: 768px) {
	#debtors-container.page-table-container {
		flex-direction: column;
	}

	#debtors-container .debtors-data,
	#debtors-container .stats-container {
		width: 100%;
		max-width: 100%;
		padding: 10px;
		/* max-height: 50%; */
	}

	#debtors-container .debtors-data {
		flex: 1 1 auto;
		border-right: none;
	}

	#debtors-container .stats-container {
		border-top: 1px solid var(--color-border-window);
	}
}

.charts-container {
	display: flex;
	align-items: flex-end;
}

.chart-stats {
	flex: 1 1 auto;
}

#statsChart {
	/* width: 100% !important;
	display: block;
	 */
	width: 100%;
	height: 263px;
	display: block;
	box-sizing: border-box;
}
#profitChart {
	width: 40px;
	height: 264px;
	display: block;
	box-sizing: border-box;
}

.stats-refresh-button {
	position: absolute;
	right: 15px;
	top: 10px;
	padding: 7px;
}

#exchange-container {
	display: flex;
	flex-direction: column;
}
.exchange-row {
	flex: 1 1 50%;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 50%;
}

.from_us_exchange,
.to_us_exchange {
	width: 100%;
	height: 100%;
}

.exchange-row h2 {
	font-weight: 600;
	color: #2c3e50;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 10px;
	font-size: 16px;
	border: 1px solid var(--color-border-window);
}

.exchange-totals {
	text-align: right;
	font-size: 14px;
}

.exchange-summary {
	display: flex;
	justify-content: end;
	gap: 20px;
	align-items: center;
	padding: 10px 20px;
	border: 1px solid var(--color-border-window);
	border-top: none;
	background-color: var(--color-table-background);
}

.dropdown-divider {
	height: 1px;
	background-color: #e1e6eb;
}

#suppliers-account-container .table-container {
	width: max-content;
}

.account-summary-block {
	width: max-content;
	margin-left: auto;
	font-size: 14px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	padding: 5px;
	gap: 5px;
	border: 1px solid var(--color-border-window);
	border-top: none;
}

.account-summary-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.account-summary-label {
	min-width: 84px;
	width: 84px;
	display: block;
	text-align: right;
}

.account-summary-value {
	font-weight: 700;
	text-align: right;
	min-width: 100px;
	width: 100px;
}

#summary-container.summary-container .table-container {
	width: 100%;
}

.refresh-money-logs-btn {
	position: absolute;
	top: 0px;
	right: 20px;
	z-index: 10;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 50%;
	padding: 6px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: background 0.2s;
}
.refresh-money-logs-btn:hover {
	background: #f0f0f0;
}

#summary-1 .table-container,
#summary-2 .table-container,
#summary-3 .table-container {
	max-height: 400px;
}

.table-sum-indicator {
	position: absolute;
	bottom: 50px;
	left: 10px;
	background-color: #f0f0f0;
	border: 1px solid #ccc;
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 100;
	display: none;
	margin-left: auto;
	margin-top: 10px;
}

@media (max-width: 525px) {
	.hidden-rows-counter {
		bottom: 45px;
	}
}

#investor-operations-details {
	padding: 4px 0;
}

#summary-3 .debtors-office-list__row {
	background-color: transparent;
	margin-top: 10px;
}

#summary-3 .debtors-office-list__row .debtors-details-title {
	border: none;
}

.icon-tooltip {
	position: absolute;
	background: #333;
	color: #fff;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	z-index: 1000;
	pointer-events: none;
	transform: translate(-50%, -120%);
}

#table-container {
	height: 100%;
}

#table-container .table-container {
	overflow-y: hidden;
	flex: 0 0 auto;
	height: max-content;
}

.add-invest-operation__selects {
	display: flex;
	flex-direction: column;
}
