h1, h2, h3, p, li, input, select, option, textarea, th, td, caption
{
	font: normal 14px verdana;
}
h1
{
	font-size: 18px;
}
h2, caption
{
	font-size: 16px;
}
body
{
	margin: 0px;
	padding: 0px;
}



input[type="button"], input[type="submit"], input[type="text"], input[type="password"], select, .button_general, textarea, .button
{
	padding: 0px;
	padding-left: 10px;
	padding-right: 10px;
	margin: 1px;
	border-width: 0px;
	height: 40px;
	width: auto;
	color: #888;
	background-color: #fff;
	box-shadow: 0px 0px 3px #999;
	box-sizing: border-box;
}
.button
{
	display: inline-block;
	padding: 10px;
	float: none;
	height: auto;
}
input[type="text"][disabled="disabled"],
input[type="text"][disabled=""]
{
	color: #ccc;
	box-shadow: 0px 0px 1px #999;
}
input[type="button"], input[type="submit"], .button
{
	cursor: pointer;
}
input[type="button"], input[type="button"]:hover, input[type="button"]:active, input[type="submit"], input[type="submit"]:hover, input[type="submit"]:active, .button, .button:hover, .button:active
{
	background-color: #f0f0f0;
	cursor: pointer;
}
input[type="button"]:hover, input[type="submit"]:hover, .button:hover
{
	background-color: #f9f9f9;
}
input[type="button"].active, input[type="submit"].active, .button.active
{
	background-color: #358;
	color: #fff;
}
input[type="button"]:active, input[type="submit"]:active, .button:active
{
	background-color: #358;
	color: #fff;
}
input[type="button"][disabled="disabled"], input[type="submit"][disabled="disabled"], .button[disabled="disabled"],
input[type="button"][disabled=""], input[type="submit"][disabled=""], .button[disabled=""]
{
	background-color: #f9f9f9 !important;
	color: #ddd !important;
	cursor: default !important;
	box-shadow: 0px 0px 3px #ddd !important;
}
input[type="text"].digit
{
	text-align: right;
}
input[type="text"].calendar
{
	text-align: center;
	max-width: 100px;
}
input[type="text"][maxlength="200"],
input[type="text"][maxlength="100"]
{
	width: 100%;
	max-width: 280px;
}
input[type="text"][maxlength="50"],
input[type="text"][maxlength="40"]
{
	width: 100%;
	max-width: 220px;
}
input[type="text"][maxlength="20"]
{
	width: 100%;
	max-width: 180px;
}
input[type="text"][maxlength="14"]
{
	width: 100%;
	max-width: 1200px;
}
input[type="text"][maxlength="13"]
{
	width: 100%;
	max-width: 120px;
}
input[type="text"][maxlength="3"]
{
	width: 100%;
	max-width: 50px;
}
textarea
{
	padding: 10px;
}


body
{
	display: flex;
	flex-direction: column;
	height: 100vh;
}
body > div:nth-child(2)
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
body > div:nth-child(2) > div.document
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
body > div:nth-child(2) > div.document > div:nth-child(2)
{
	flex-grow: 1;
	overflow: auto;
}

table.grid-edit thead tr:nth-child(2)
{
	display: none;
}

.search-panel
{
	display: flex;
	flex-direction: row;
	padding: 3px;
	box-sizing: border-box;
}
.search-panel > .search-results
{
	width: 300px;
	min-width: 300px;
	max-width: 300px;
	padding: 3px;
	box-sizing: border-box;
	overflow: auto;
	display: flex;
	flex-direction: column;
	max-height: 100%;
}
.search-panel > .search-editor
{
	padding: 3px;
	width: 100%;
	box-sizing: border-box;
	overflow: auto;
	height: calc(100vh - 120px);
}
.search-panel > .search-results #search-results-list-rows
{
	height: calc(100vh - 160px);
}

@media only screen and (max-width: 800px)
{
	.search-panel
	{
		display: block;
	}
	.search-panel > .search-results
	{
		width: 100%;
		max-width: none;
	}
	.search-panel > .search-results #search-results-list-rows
	{
		max-height: 160px;
		border: 1px solid #666;
		padding: 10px;
	}
	*
	{
		word-break: break-word;
	}
}


.search-form
{
	display: flex;
	flex-direction: row;
}
.search-form *
{
	box-sizing: border-box;
}
.search-form > form:nth-child(3)
{
	flex-grow: 1;
}
.search-form form
{
	display: inline-block;
	margin: 0px;
	padding: 3px;
}
.search-form p
{
	display: inline-block;
	margin: 0px;
	padding: 0px;
}
.search-form p > span
{
	white-space: nowrap;
}


.search-results > div > div:nth-child(1)
{
	text-align: center;
	background-color: #358;
	color: #fff;
	padding: 10px;
}
.search-results > div > div:nth-child(1) *
{
	margin: 0px;
	padding: 0px;
}
.search-results ul
{
	list-style-type: none;
	padding: 0px;
	margin: 0px;
	overflow: auto;
	max-height1: calc(100vh - 140px);
}
.search-results li
{
	list-style-type: none;
	padding: 0px;
	margin: 0px;
	margin-top: 1px
}
.search-results li:nth-child(1)
{
	margin-top: 0px
}
.search-results li > p
{
	border: 1px solid #f0f0f0;
	padding: 10px;
	margin: 0px;
	cursor: pointer;
}
.search-results li > p > *
{
	display: block;
	margin-top: 4px;
}
.search-results li > p > *:nth-child(1)
{
	margin-top: 0px;
}
.search-results li > p:hover
{
	background-color: #eee;
	border-color: #358;
}
.search-results li > p:active
{
	color: #fff;
	background-color: #000;
}
.search-results li > p.selected
{
	color: #fff;
	background-color: #358;
	border-color: #358;
}

.search-editor > div
{
	min-height: 100%;
	display: flex;
	flex-direction: column;
}
.search-editor > div > div:nth-child(1)
{
	text-align: center;
	background-color: #358;
	color: #fff;
	padding: 10px;
}
.search-editor > div > div:nth-child(1) *
{
	margin: 0px;
	padding: 0px;
}
.search-editor > div > div:nth-child(2)
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	overflow: auto;
	max-height1: calc(100vh - 140px);
}
.search-editor > div > div:nth-child(2) > *:nth-child(2)
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.search-editor > div > div:nth-child(2) > *:nth-child(2) > *
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}


.tabpanels .tabpanels-buttons
{
}
.tabpanels .tabpanels-buttons p
{
	margin: 0px;
	padding: 0px;
}
.tabpanels .tabpanels-buttons > div
{
	display: flex;
	flex-direction: row;
}
.tabpanels .tabpanels-panels
{
	border: 1px solid #ccc;
	padding: 10px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.tabpanels .tabpanels-panels > div
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.tabpanels .tabpanels-panels > div > div
{
	flex-grow: 1;
	flex-direction: column;
	display: none;
}
.tabpanels .tabpanels-panels > div > div.tabpanels-panel-visible
{
	display: flex;
}
.tabpanels .tabpanels-panels > div > div > div
{
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}


table.grid
{
	border: 1px solid transparent;
	padding: 10px;
	border-color: #999;
}
table.grid th,
table.grid td
{
	padding: 10px;
}
table.grid td
{
	vertical-align: top;
}
table.grid th
{
	background-color: #f0f0f0;
}
table.grid tr:nth-child(even) td
{
	background-color: #f9f9f9;
}

.uwagi
{
	background-color: #f0f0f0;
	padding: 20px;
	box-sizing: border-box;
}
.uwagi > *:nth-child(1)
{
	margin: 0px;
	padding: 0px;
}


table.name-value
{
	border: 1px solid transparent;
	padding: 10px;
	border-color: #999;
	width: 100%;
}
table.name-value td
{
	padding: 10px;
}
table.name-value td:nth-child(1)
{
	text-align: right;
	white-space: nowrap;
}
table.name-value td:nth-child(2)
{
	width: 100%;
}
table.name-value td:nth-child(2)
{
	background-color: #f9f9f9;
}

.dialogs > *
{
	display: none;
}
.dialogs > *.dialog-visible
{
	display: block;
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0px;
	left: 0px;
	z-index: 10;
}
.dialogs > * > *
{
	width: 100%;
	max-width: 800px;
	min-height: 200px;
	max-height: calc(90vh - 100px);
	margin-left: auto;
	margin-right: auto;
	margin-top: 50px;
	border: 1px solid #999;
	background-color: #fff;
	box-shadow: 1px 1px 10px #666;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.dialogs > * > * > header
{
	background-color: #447788;
	box-shadow: 0px 0px 4px #666;
}
.dialogs > * > * > header h2
{
	color: #fff;
	margin: 0px;
	padding: 10px;
}
.dialogs > * > * > div
{
	flex-grow: 1;
	overflow: auto;
}
.dialogs > * > * > footer
{
	background-color: #eee;
	box-shadow: 0px 0px 4px #666;
	text-align: center;
	margin: 0px;
	padding: 0px;
}
.dialogs > * > * > footer p
{
	text-align: center;
	margin: 0px;
	padding: 10px;
}
.dialogs > *#help-panel > *
{
	max-width: calc(100% - 100px);
}