:root {
	--theme-white : white;
	--theme-black : black;
	--theme-bg-color : white;
	--theme-text-color : #004566;
	--theme-main-color : #B3E7FF;
	--theme-dark-color : #002A40;
	--theme-semi-dark-color : #3A84A6;
	--theme-medium-color : #62B3D9;
	--theme-light-color : #E6F7FF;

	--theme-sec-light-color : #F2F9FF;
	--theme-sec-lighter-color : #E6F3FF;
	--theme-sec-color : #D9EDFF;
	--theme-sec-medium-color : #ADCAE6;
	--theme-sec-semi-dark-color : #6B90B3;
	--theme-sec-dark-color : #1F374D;

	--theme-alarm-color : #BF0000;

	--main-bg-color : var(--theme-bg-color);
	--main-text-color : var(--theme-text-color);
	--entry-bg-color : var(--theme-bg-color);
	--entry-text-color : var(--theme-text-color);
	--header-bg-color : var(--theme-main-color);
	--header-text-color : var(--theme-dark-color);
	--header-border-color : var(--theme-medium-color);
	--logo-border-color : var(--theme-semi-dark-color);
	--border-color : var(--theme-medium-color);
	--input-bg-color : var(--theme-light-color);
	--input-text-color : var(--theme-text-color);
	--input-border-color : var(--theme-medium-color);
	--input-focus-bg-color : var(--theme-bg-color);
	--input-focus-fg-color : var(--theme-text-color);
	--input-focus-border-color : var(--theme-medium-color);
	--input-disabled-bg-color : var(--theme-bg-color);
	--input-disabled-fg-color : var(--theme-main-color);
	--input-disabled-border-color : var(--theme-main-color);
	--button-bg-color : var(--theme-main-color);
	--button-text-color : var(--theme-dark-color);
	--button-border-color : var(--theme-medium-color);
	--button-focus-fg-color : var(--theme-white);
	--button-focus-bg-color : var(--theme-medium-color);
	--button-focus-border-color : var(--theme-semi-dark-color);
	--button-disabled-fg-color : var(--theme-medium-color);
	--button-disabled-bg-color : var(--theme-light-color);
	--button-disabled-border-color : var(--theme-medium-color);
	--menu-bg-color : var(--theme-sec-color);
	--menu-text-color : var(--theme-sec-dark-color);
	--menu-border-color : var(--theme-sec-medium-color);
	--menu-active-color : var(--theme-white);
	--menu-active-bg-color : var(--theme-sec-semi-dark-color);
	--menu-active-border-color : var(--theme-sec-dark-color);
	--menu-focus-color : var(--theme-sec-dark-color);
	--menu-focus-bg-color : var(--theme-sec-light-color);
	--tabs-header-bg-color : var(--theme-sec-color);
	--tabs-header-color : var(--theme-sec-dark-color);
	--tabs-header-active-color : var(--theme-white);
	--tabs-header-active-bg-color : var(--theme-sec-semi-dark-color);
	--tabs-header-focus-color : var(--theme-sec-dark-color);
	--tabs-header-focus-bg-color : var(--theme-sec-light-color);
	--table-border-color : var(--theme-medium-color);
	--table-header-text-color : var(--theme-dark-color);
	--table-header-bg-color : var(--theme-main-color);
	--table-prim-text-color : var(--theme-text-color);
	--table-prim-bg-color : var(--theme-bg-color);
	--table-sec-text-color : var(--theme-text-color);
	--table-sec-bg-color : var(--theme-light-color);
	--table-hover-text-color : var(--theme-sec-dark-color);
	--table-hover-bg-color : var(--theme-sec-medium-color);
	--table-hover-active-color : var(--theme-white);
	--table-hover-border-color : var(--theme-sec-semi-dark-color);
	--table-selected-text-color : var(--theme-dark-color);
	--table-selected-bg-color : var(--theme-medium-color);
	--table-selected-border-color : var(--theme-semi-dark-color);
	--table-selected-hover-text-color : var(--theme-sec-dark-color);
	--table-selected-hover-bg-color : var(--theme-sec-semi-dark-color);
	--table-selected-hover-border-color : var(--theme-sec-dark-color);
	--table-active-text-color : var(--theme-white);
	--table-active-bg-color : var(--theme-semi-dark-color);
	--table-active-border-color : var(--theme-white);
	--table-active-hover-text-color : var(--theme-white);
	--table-active-hover-bg-color : var(--theme-sec-semi-dark-color);
	--table-active-hover-border-color : var(--theme-white);
	--popup-header-text-color : var(--theme-dark-color);
	--popup-header-bg-color : var(--theme-main-color);
	--popup-header-active-color : var(--theme-semi-dark-color);
	--popup-border-color : var(--theme-medium-color);
}

html {
	font-family: Roboto,Ubuntu,Verdana,Arial,Open Sans,sans-serif;
	font-weight: normal;
}

body {
	margin: 0;
	font-size: 12pt;
	min-width: 1024px;
	min-height : 100vh;
	background : var(--main-bg-color);
	color : var(--main-text-color);
}

body.app, body.narrow {
	display: flex;
	flex-direction: column;
}

body.narrow {
	align-items : center;
}

body * {
	margin: 0;
	padding: 0;
	font-family: Roboto,Ubuntu,Verdana,Arial,Open Sans,sans-serif;
	font-size: 1em;
	font-weight: normal;
	border: none;
	box-sizing: content-box;
}

small, sub, super {
	font-size : 0.75em;
}

.hidden {
	display : none !important;
}

strong, .strong {
	font-weight : bolder !important;
}

em, .em {
	font-style : italic !important;
}

.red {
	color: red !important;
}

.nowrap {
	white-space: nowrap;
}

.button-like {
	display : inline-flex;
	flex-wrap : nowrap;
	align-items : center;
	justify-content : center;
}

.button-like > * {
	flex : none;
}

svg.icon {
	display : inline-block;
	vertical-align : middle;
	width : 1.5em;
	height : 1.5em;
	margin : 0.1em 0.25em;
}

svg.icon.giant {
	width : 64px;
	height : 64px;
}

svg.icon.large {
	width : 48px;
	height : 48px;
}

svg.icon.medium {
	width : 32px;
	height : 32px;
}

svg.icon.small {
	width : 24px;
	height : 24px;
}

svg.icon.tiny {
	width : 16px;
	height : 16px;
}

/*
svg.icon, symbol {
	fill : none;
	stroke : none;
}

symbol.filled, symbol .filled, svg.icon .filled {
	fill : currentColor;
}

symbol.stroked, symbol .stroked, svg.stroked, svg .stroked {
	stroke : currentColor;
	stroke-width : 3px;
}

symbol.stroked.thick, symbol .stroked.thick, svg.stroked.thick, svg .stroked.thick {
	stroke-width : 4px;
}

symbol.stroked.thin, symbol .stroked.thin, svg.stroked.thin, svg .stroked.thin {
	stroke-width : 2.5px;
}
*/

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

body > header {
	padding: 10px 20px;
	font-family : Bookman Old Style, IBM Plex Serif, serif;
	background : var(--header-bg-color);
	color : var(--header-text-color);
	border-bottom: 1px solid var(--header-border-color);
}

header h1 {
	font-family : inherit;
	font-size : 16pt;
	font-weight : 600;
	font-style : normal;
	margin: 0;
}

body:not(.index) > header h1 {
	margin-bottom : 0.5em;
	display : flex;
	align-items : center;
}

body.narrow > header h1 {
	width : 1024px;
}

header img {
	vertical-align: middle;
	margin-right: 1em;
	flex-shrink : 0;
}

header.grid {
	display: grid;
	grid-template-columns: auto 10em;
}

header.grid .main {
	grid-column : 1;
}

header.grid nav.main {
	margin-top : 1em;
}

header.grid .floater {
	position: relative;
	grid-column: 2;
	grid-row: 1;
	text-align: right;
}

/*
header.grid .floater nav {
	position: absolute;
	border: 1px solid #9AAB82;
	box-shadow: 0 0 0 3px white, 2px 2px 2px 3px rgba(43, 54, 13, 0.6);
	right: 0;
	padding: 1em 1.2em;
	border-radius: 0.5em;
	background: white;
	margin-top: 3px;
	width: max-content;
}
*/

#logo {
	border : 2px solid var(--logo-border-color);
	margin-right : 20px;
}

#container-topmost {
	display : flex;
	min-height : 100%;
	flex-grow : 1;
}

#container-main {
	flex-grow : 1;
	min-width : 0;
}

#side-menu {
	color: var(--menu-text-color);
	background-color: var(--menu-bg-color);
	border-right : 1px solid var(--menu-border-color);
	width : min-content;
	overflow : hidden;
	flex : none;
}

#side-menu #side-menu-switch-button {
	display : flex;
	width : 2em;
	height : 2em;
	overflow : hidden;
	text-align : center;
	margin : 0.5em 20px;
	padding : 0;
	cursor: pointer;
	border : 1px solid var(--menu-active-border-color);
	border-radius : 6px;
	background : var(--menu-active-bg-color);
	color: var(--menu-active-color);
}

#side-menu-switch:not(:checked) + nav .sidemenu-open,
#side-menu-switch:checked + nav .sidemenu-closed {
	display : none;
}

#side-menu label {
	display : flex;
	align-items : center;
	padding : 0.2em 20px;
	cursor: pointer;
}

#side-menu label.button-like {
	display : block;
	min-width : unset;
}

#side-menu input:checked + label {
	color: var(--menu-active-color);
	background-color: var(--menu-active-bg-color);
}

#side-menu label:focus {
	color: var(--menu-focus-color);
	background-color: var(--menu-focus-bg-color);
}

#side-menu label svg {
	flex : none;
}

#side-menu label span {
	min-width : 8em;
}

#main-menu {
	display : block;
	margin : 0 20px;
	color: var(--menu-text-color);
	background-color: var(--menu-bg-color);
	border-width : 0 1px 1px 1px;
	border-style : solid;
	border-color : var(--menu-border-color);
	white-space: nowrap;
	overflow: hidden;
}

#main-menu label {
	display : inline-block;
	padding: 8px 16px;
	outline-offset : -2px;
	cursor: pointer;
}

#main-menu input:checked + label {
	color: var(--menu-active-color);
	background-color: var(--menu-active-bg-color);
}

#main-menu label:focus {
	color: var(--menu-focus-color);
	background-color: var(--menu-focus-bg-color);
}

body:not(.narrow) nav ul {
	list-style: none;
}

nav a {
	text-decoration : none;
}

nav a:hover {
	text-decoration : underline;
}

footer {
	padding: 20px;
}

footer p {
	margin: 1em 1.2em;
}

main {
	margin: 20px;
}

.narrow main {
	width : 1024px;
	color: var(--main-text-color);
	background-color: var(--main-bg-color);
}

.narrow main nav {
	max-width : 468px;
	background-color: var(--theme-main-color);
	color : var(--theme-dark-color);
    border: 1px solid var(--border-color);
    padding: 1em 2em 1em 2.5em;
    display: inline-block;
    border-radius: 0.5em;
}

.narrow main aside {
    border: 1px solid var(--border-color);
	background-color: var(--theme-light-color);
	color : var(--theme-dark-color);
    margin: 1em 1.2em;
    padding: 1em 2em;
}

.narrow main nav p, .narrow main nav li {
	margin : 0 0 0.2em 0;
}

.narrow main nav p {
	margin-top : 0.8em;
}

.narrow main nav p:last-child, .narrow main nav ul:last-child > li:last-child {
	margin-bottom : 0;
}

.narrow main nav ul + ul {
	margin-top : 1.2em;
}

.narrow main article {
	text-align : justify;
}

.narrow main article table {
	width : auto;
	margin : 1em 1.2em;
}

.narrow main article table:not(:last-child) {
	margin-bottom: 0.2em;
}

.narrow main article tbody th, .narrow main article tfoot th, th[scope=row] {
	text-align: left;
}

main article p.example, main article p.notice, main article p.urgent {
	font-style: italic;
}

main article p.urgent {
	color : var(--theme-alarm-color);
}

main h2 {
	font-size : 1.2em;
	margin-top: 1.2em;
	margin-bottom: 1.2em;
}

.narrow main article h2 {
	text-align : center;
}

main h3 {
	font-weight: bolder;
}

.narrow main article h3 {
	margin-left: 1.2em;
	margin-top: 1.5em;
	margin-bottom: 1em;
}

main p:not(:last-child), main li:not(:last-child) {
	margin-bottom: 0.2em;
}

button > img, .content-section > header button > img {
	float: unset;
	vertical-align: middle;
	margin-right: 0.5em
}

.narrow main header {
	margin: 0 1.2em 1.2em 1.2em;
}

.narrow main .legend {
	margin-left : 60%;
	text-align : left;
}

main article h3, main article p, main article li, main article dl, main article form, main section aside p, main section aside li {
	margin: 1em 1.2em;
}

main article li {
	margin-left : 3em;
}

main aside p {
	margin-bottom: 0.3em;
}

main > section.inline, main > div > section.inline {
	display : inline-block;
	border-radius : 1em;
	padding : 2em 3em 0.8em 3em;
}

main section.tabs header {
	padding : 0;
	margin : 0;
	color: var(--tabs-header-color);
	background-color: var(--tabs-header-bg-color);
	white-space: nowrap;
	overflow: hidden;
}

main section.tabs header label {
	display : inline-block;
	padding: 8px 16px;
	outline-offset : -2px;
	cursor: pointer;
}

main section.tabs header label:focus {
	color: var(--tabs-header-focus-color);
	background-color: var(--tabs-header-focus-bg-color);
}

main section.tabs header input:checked + label {
	color: var(--tabs-header-active-color);
	background-color: var(--tabs-header-active-bg-color);
}

main section.tabs header img {
	margin-right: 1em;
	vertical-align: middle;
}

main article table {
	border-top : 1px solid var(--table-border-color);
}

main article table.border th, main article table.border td {
	border: 1px solid var(--table-border-color) !important;
}

main article table > :first-child tr:first-of-type td, main article table > :first-child tr:first-of-type th {
	border-top: none;
}

main article table > :last-child tr:last-of-type td, main article table > :last-child tr:last-of-type th {
	border-bottom: none;
}

main article table td:first-child, main article table th:first-child {
	border-left: none;
}

main article table td:last-child, main article table th:last-child {
	border-right: none;
}

main article table select, main article table select + span.selector-arrow, main article table input, .popup table input {
	color: var(--main-text-color);
}

main article table select, main article table input, .popup table input {
	background-color : var(--main-bg-color);
	width : 16em;
}

main table a[data-result=ok] {
	background-color : green;
	color : white;
}

main table a[data-result=reject] {
	background-color : red;
	color : white;
}

main > header, .content-section > header, .content-section > section, .content-section > article, main > div > section {
	border: 3px solid var(--border-color);
}

main > header, .content-section > header {
	border-radius: 1em;
	padding: 1em 1.25em;
	color: inherit;
	background-color: inherit;
}

.content-section > header img {
	float: left;
	margin-right: 1em;
}

main > header, .content-section > header, .content-section > section:not(:last-child), .content-section > div > section:not(:last-child), .content-section aside:not(:last-child) {
	margin-bottom: 1em;
}

.content-section > section, .content-section > article, .content-section > div > section {
	border-radius: 1em 1em 0 0;
	overflow : hidden;
}

.content-section > section header, .content-section > div > section header {
	padding : 0.6em 1.25em;
	margin : -3px -3px 0 -3px;
}

h1 {
	font-size: 1.375em;
	font-weight: normal;
	margin-bottom: 20px;
}

a, a:visited {
	color : inherit;
}

dl {
	display : grid;
	grid-template-columns : max-content 1fr;
	grid-gap : 0.2em 0.5em;
}

dl:not(:last-child) {
	margin-bottom : 1em;
}

dt {
	grid-column : 1;
	text-align : right;
}

dt, dfn {
	font-weight : bolder;
	font-style : normal;
}

dt:after {
	content : ':';
}

dd {
	grid-column : 2;
}

body.narrow dl {
	display : block;
}

body.narrow dt {
	display : inline;
}

body.narrow dt:after {
	content : ' – ';
	font-weight : normal;
}

body.narrow dd {
	display : inline;
}

body.narrow dd:after {
	display : block;
	content : '';
	margin-bottom : 0.5em;
}

ol[type=a] {
	list-style-type : none;
	margin-left : 2.5em;
}

ol[type=a] li {
	margin-left : 0;
}

ol[type=a] li:before {
	display : inline-block;
	width : 1.3em;
	margin-left : -1.3em;
}

ol[type=a] li:first-of-type:before {
	content : 'а)';
}

ol[type=a] li:nth-of-type(2):before {
	content : 'б)';
}

ol[type=a] li:nth-of-type(3):before {
	content : 'в)';
}

ol[type=a] li:nth-of-type(4):before {
	content : 'г)';
}

ol[type=a] li:nth-of-type(5):before {
	content : 'д)';
}

ol[type=a] li:nth-of-type(6):before {
	content : 'е)';
}

ol[type=a] li:nth-of-type(7):before {
	content : 'ж)';
}

ol[type=a] li:nth-of-type(8):before {
	content : 'з)';
}

ol[type=a] li:nth-of-type(9):before {
	content : 'и)';
}

ol[type=a] li:nth-of-type(10):before {
	content : 'к)';
}

button {
	cursor: pointer;
	padding: 0.2em 1em;
	margin-right: 1px;
	margin-bottom: 1px;
	color: var(--button-text-color);
	background-color: var(--button-bg-color);
	border : 1px solid var(--button-border-color);
	border-radius: 1em;
}

:not(.hidden) ~ button, :not(.hidden) ~ select, :not(.hidden) ~ span.selector-wrapper, :not(.hidden) ~ input, :not(.hidden) ~ textarea, aside :not(.hidden) ~ label, aside :not(.hidden) ~ span label:first-child {
	margin-left: 1em;
}

button:focus, input:focus, select:focus, textarea:focus, span.fake-radio:focus, svg.fake-checkbox:focus, a:focus, a:visited:focus {
	outline: 1px dotted var(--theme-medium-color);
}

button:disabled {
	color: var(--button-disabled-fg-color);
	background-color: var(--button-disabled-bg-color);
	border-color: var(--button-disabled-border-color);
}

button:focus {
	background-color: var(--button-focus-bg-color);
	color : var(--button-focus-fg-color);
	border-color : var(--button-focus-border-color);
}

button:active:not(.iconic):not(:disabled) {
	position: relative;
	left: 1px;
	top: 1px;
}

button.image {
	padding : 0.2em 0.2em;
}

button.iconic {
	display: inline-block;
	width: 17px;
	height: 17px;
	background-color: transparent;
	color: inherit;
	border: none;
	border-radius: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	cursor: pointer;
	text-align : left;
	vertical-align: middle;
}

button.iconic svg.icon.icon {
	width : 16px;
	height : 16px;
	vertical-align : 0;
	margin : 0;
}

button.iconic.close-red {
	background-image: url('/img/ico-close-red.png');
}

button.iconic.check-green {
	background-image: url('/img/ico-check-green.png');
}

button.iconic.close-red, button.iconic.check-green {
	text-indent : -999px;
	background-repeat : no-repeat;
	opacity : 75%;
}

/*
button.iconic.doc {
	background-image: url('/img/ico-doc.png');
}
*/

button.iconic:hover {
}

button.iconic.close-red:hover, button.iconic.check-green:hover {
	background-position: 0 0;
	opacity : 100%;
}

button.iconic:active svg.icon {
	padding-left : 1px;
	padding-top : 1px;
}

button.iconic.close-red:active, button.iconic.check-green:active {
	background-position: 0 0;
	opacity : 100%;
}

button svg.icon {
	width : 1em;
	height : 1em;
	margin-top : 0;
	margin-bottom : 0;
	vertical-align : -0.15em;
}

button.image svg.icon {
	margin : 0.1em;
	vertical-align : top;
}

form {
	display: inline-grid;
	grid-template-columns: [label] max-content [field] max-content [button] max-content;
	grid-row-gap: 0.5em;
	align-items: center;
	padding: 1px;
}

form label {
	grid-column: label;
	text-align: right;
	max-width: 450px;
}

form .form-field {
	grid-column: field;
}

form label.fake-filename {
	text-align: left;
	grid-area: auto;
}

form div.checkbox-container, form div.radio-container, form div.group-container {
	display: flex;
	flex-wrap: wrap;
	width: 16.5em;
	font-family: inherit;
	font-size: inherit;
	padding: 0;
	margin: 0 0 0 0.5em;
	color: inherit;
	background-color: inherit;
}

label.checkbox-title, label.radio-title {
	flex-grow: 1;
	text-align: left;
	margin: 0 0 0.2em 0.5em;
}

svg.fake-checkbox, span.fake-radio {
	display : inline-block;
	width : 16px;
	height : 16px;
	border : 2px solid var(--input-border-color);
	margin : 0 0.5em 0 0;
	vertical-align : middle;
}

span.fake-radio {
	border-radius : 10px;
}

input[type=checkbox] + svg.fake-checkbox, input[type=radio] + span.fake-radio {
	background : var(--input-bg-color);
}

input[type=checkbox] + svg.fake-checkbox {
	color : transparent;
}

input[type=checkbox]:checked + svg.fake-checkbox {
	color : var(--input-text-color);
}

input[type=checkbox]:disabled + svg.fake-checkbox,input[type=radio]:disabled + span.fake-radio {
	border-width : 1px;
	background : var(--input-disabled-bg-color);
	border-color : var(--input-disabled-border-color);
}

input[type=checkbox]:disabled:checked + svg.fake-checkbox,input[type=radio]:disabled + span.fake-radio {
	color : var(--input-disabled-fg-color);
}

input[type=checkbox]:disabled ~ span,input[type=radio]:disabled ~ span {
	color : var(--input-disabled-fg-color);
	background : var(--input-disabled-bg-color);
}

input[type=checkbox] + svg.fake-checkbox:focus, input[type=radio] + span.fake-radio:focus {
	background : var(--input-focus-bg-color);
}

input[type=checkbox]:checked + svg.fake-checkbox:focus {
	color : var(--input-focus-fg-color);
}

input[type=radio]:checked + span.fake-radio {
	background : var(--input-text-color);
	box-shadow : inset 0 0 0 4px var(--input-bg-color);
}

input[type=radio]:checked + span.fake-radio:focus {
	background : var(--input-focus-fg-color);
	box-shadow : inset 0 0 0 4px var(--input-focus-bg-color);
}

input[type=radio]:checked:disabled + span.fake-radio {
	background : var(--input-disabled-fg-color);
	box-shadow : inset 0 0 0 4px var(--input-disabled-bg-color);
}

form > button {
	justify-self : start;
}

textarea.wide, form textarea.wide {
	grid-column : label / span 2;
	min-width : 500px;
	min-height : 250px;
	margin-left : 0 !important;
}

form .uploaded-files {
	text-align : left;
	min-height : 66px;
	grid-column : field / span 2;
}

.uploaded-files .file-icon {
	position : relative;
	display : inline-block;
	width : 50px;
	height : 66px;
	background : url('/img/basic-sheet-txt.png') 0 2px no-repeat;
}

.file-icon button.iconic.close {
	background-image : url('/img/ico-close-red.png');
	position : absolute;
	top : -2px;
	right : -2px;
	opacity : 0;
}

.file-icon:hover button.iconic.close, .file-icon:focus button.iconic.close, .file-icon button.iconic.close:focus, .file-icon button.iconic.close:hover, .file-icon button.iconic.close:active {
	opacity : 100%;
}

.file-icon button.iconic.close:hover, .file-icon button.iconic.close:active {
	background-position: 0 0;
}

.file-icon button.iconic.close:active {
	top : -1px;
	right : -3px;
}

input, select, select + span.selector-arrow, textarea, span.file-panel {
	color: var(--input-text-color);
}

input, select, textarea, span.file-panel {
	appearance: none;
	font-family: inherit;
	font-size: inherit;
	border: 1px solid var(--input-border-color);
	border-radius: 0.5em;
	background-color: var(--input-bg-color);
}

input:focus, select:focus, select:focus + span.selector-arrow, textarea:focus, span.file-panel:focus {
	color : var(--input-focus-fg-color);
}

input:focus, select:focus, textarea:focus, span.file-panel:focus {
	background : var(--input-focus-bg-color);
	border-color : var(--input-focus-border-color);
}

input, select, span.file-panel {
	width: 15em;
	height: 1.2em;
	padding: 0.1em 0.5em;
	line-height: 1em;
}

textarea {
	width : 20em;
	height : 10em;
	resize : none;
	padding: 0.3em 0.5em;
	grid-column : span 2;
}

span.selector-arrow {
	display : inline-block;
	width : 0;
	height : 0;
	overflow : visible;
	position : relative;
	right : 1.8em;
	top : 0.15em;
	pointer-events : none;
}

span.selector-arrow svg {
	width : 1em;
	height : 1em;
	margin : 0;
}

select {
	padding-right: 2em;
	width: 13.5em;
}

select option.placeholder {
	display : none;
}

#form-shedule-create-shedule-idle-times, #form-shedule-create-shedule-idle-times > label,
#form-shedule-create-shedule-mode, #form-shedule-create-shedule-mode > label,
#form-shedule-tune-row-mode, #form-shedule-tune-row-mode > label {
	display : block;
}

#form-route-seasons-summer-start-day, #form-route-seasons-winter-start-day,
#form-update-route-season-start-day, #form-update-route-season-end-day,
#form-update-route-start-hour,#form-update-route-start-minute,#form-update-route-end-hour,#form-update-route-end-minute,
#form-shedule-create-shedule-start-hour, #form-shedule-create-shedule-start-minute,
#form-shedule-create-shedule-end-hour, #form-shedule-create-shedule-end-minute,
#form-shedule-create-shedule-idle-time-1-hour, #form-shedule-create-shedule-idle-time-1-minute,
#form-shedule-create-shedule-idle-time-2-hour, #form-shedule-create-shedule-idle-time-2-minute {
	width: 2em;
}

#form-route-seasons-summer-start-month, #form-route-seasons-winter-start-month,
#form-update-route-season-start-month, #form-update-route-season-end-month {
	width: 8em;
}

#form-route-shedule-row .checkbox-container, #form-route-add-shedule-row .checkbox-container, #form-shedule-simple-days,
#form-shedule-edit-route-info .checkbox-container, #form-shedule-create-shedule .checkbox-container,
#form-update-route-days {
	flex-direction : column;
	height : 6.2em;
}

#form-route-shedule-row label.checkbox-title, #form-route-add-shedule-row label.checkbox-title, #form-shedule-simple-days label.checkbox-title,
#form-shedule-edit-route-info label.checkbox-title, #form-shedule-create-shedule label.checkbox-title,
#form-update-route-days label.checkbox-title {
	flex-grow : unset;
}

input[type=file],input[type=checkbox],input[type=radio] {
	display: none;
}

input:disabled, select:disabled, select:disabled + span.selector-arrow, textarea:disabled {
	color : var(--input-disabled-fg-color);
}

input:disabled, select:disabled, textarea:disabled {
	background : var(--input-disabled-bg-color);
	border-color : var(--input-disabled-border-color);
}

select:disabled + span.selector-arrow {
	display: none;
}

input:invalid, select:invalid, textarea:invalid, input:invalid + svg.fake-checkbox, input:invalid + span.fake-radio, input:invalid + span.file-panel {
	border-color : var(--theme-alarm-color);
	box-shadow : none;
}

input:invalid + svg.fake-checkbox, input:invalid + span.fake-radio {
	border-width : 1px;
	padding : 1px;
}

span.file-panel {
	display : inline-block;
	position : relative;
	margin-left : 1em;
	text-align : left;
}

span.file-panel span {
	display : inline-block;
	white-space : nowrap;
	overflow : hidden;
	width : 100%;
}

span.file-panel.loaded {
	background : var(--theme-medium-color);
	color : var(--theme-white);
}

span.progress-bar {
	display : inline-block;
	position : absolute;
	z-index : 1;
	width : 1em;
	overflow : hidden;
}

table {
	width: 100%;
	border-collapse: collapse;
	box-sizing: border-box;
	color : var(--table-prim-text-color);
	background : var(--table-prim-bg-color);
}

form.lemmie-form-table {
	display: block;
	width: min-content;
}

.lemmie-form-table table {
	width: 100%;
}

.lemmie-form-table tbody td {
	padding : 1px;
}

.lemmie-form-table table input, .lemmie-form-table table select {
	border-radius : 0;
	border-width : 2px;
	padding: calc(0.25em - 3px) calc(0.5em - 3px);
	box-sizing: border-box;
	height: auto;
	line-height: 1.1875;
}

.lemmie-form-table table input:not(:focus), .lemmie-form-table table select:not(:focus) {
	border : none;
	padding: calc(0.25em - 1px) calc(0.5em - 1px);
	color: inherit;
	background-color: inherit;
}

.lemmie-form-table table input:not(:focus):invalid, .lemmie-form-table table select:not(:focus):invalid {
	box-shadow: inset 1px 1px 4px -1px var(--theme-alarm-color);
}

.lemmie-form-table table input {
	width: 100%;
}

.lemmie-form-table table select {
	width: max-content;
	min-width: 100%;
	max-width: 18em;
}

.lemmie-form-table table select + .selector-arrow {
	right: 2.1em;
	top: 0.2em;
}

.lemmie-form-table table select + .selector-arrow svg {
	padding: 0.05em 0.5em;
	background: var(--input-focus-bg-color);
}

.lemmie-form-table table select:not(:focus) + .selector-arrow {
	display: none;
}

table.fixed {
	table-layout: fixed;
}

table table {
	background-color : var(--theme-bg-color);
}

table:focus {
	outline: none;
}

table caption {
	font-size : 1.2em;
	margin-top: 1.2em;
	margin-bottom: 1.2em;
}

table td, table th {
	border: 1px solid var(--table-border-color);
	padding: 0.25em 0.5em;
	text-align: left;
}

table th, table th * {
	font-weight : bolder;
	text-align : center;
}

table th.left {
	text-align : left;
}

table td.center {
	text-align : center;
}

table td.right, table th.right {
	text-align : right;
}

table td.strong, table tr.strong td {
	font-weight : bolder;
}

table thead tr, table tfoot tr, table.mono th {
	color: var(--table-header-text-color);
	background-color: var(--table-header-bg-color);
}

table:not(.highlighted):not(.mono) tbody tr:not(.selected):not(.odd):not(:hover):nth-child(even),
table tbody tr.even {
	color: var(--table-sec-text-color);
	background-color: var(--table-sec-bg-color);
}

table td.highlight, table td.highlight[rowspan] {
	color : var(--table-sec-text-color);
	background-color: var(--table-sec-bg-color);
}

table:not(.mono) tbody tr:not(.even):not(:hover) td[rowspan]:not(.highlight),table:not(.mono) tbody tr:not(.even):not(:hover) th[rowspan] {
	color : var(--table-prim-text-color);
	background-color: var(--table-prim-bg-color);
}

table:not(.highlighted) tbody tr:hover {
	color : var(--table-hover-text-color);
	background-color: var(--table-hover-bg-color);
}

table:not(.highlighted) tbody tr:hover td {
	border-color: var(--table-hover-border-color);
}

table tbody tr.selected {
	color : var(--table-selected-text-color);
	background-color : var(--table-selected-bg-color);
}

table tbody tr.selected td {
	border-color: var(--table-selected-border-color);
}

table:not(.highlighted) tbody tr.selected:hover {
	color : var(--table-selected-hover-text-color);
	background-color : var(--table-selected-hover-bg-color);
}

table:not(.highlighted) tbody tr.selected:hover td {
	border-color: var(--table-selected-hover-border-color);
}

table tbody tr.active {
	color : var(--table-active-text-color);
	background-color : var(--table-active-bg-color);
}

table tbody tr.active td {
	border-color: var(--table-active-border-color);
}

table:not(.highlighted) tbody tr.active:hover {
	color : var(--table-active-hover-text-color);
	background-color : var(--table-active-hover-bg-color);
}

table:not(.highlighted) tbody tr.active:hover td {
	border-color: var(--table-active-hover-border-color);
}

table tr td p {
	margin : 0;
}

table tr td li {
	margin-top : 0;
	margin-bottom : 0;
}

.narrow main table tr td p:not(:last-child), .narrow main table tr td li {
	margin-bottom : 0.5em;
}

.narrow main table tr td ul:last-child > li:last-child, .narrow main table tr td ol:last-child > li:last-child {
	margin-bottom : 0;
}

/*
td p {
	margin : 0 !important;
}
*/

.left {
	text-align: left;
}

.center {
	text-align: center;
}

.right {
	text-align: right;
}

td .button-like {
	display: inline-block;
	width: 17px;
	height: 17px;
	overflow: hidden;
	cursor: pointer;
	vertical-align: middle;
}

td .button-like svg.icon {
	width : 16px;
	height : 16px;
	margin : 0;
	vertical-align : 0;
}

/*
td .button-like.doc {
	background-image: url('/img/ico-doc.png');
}
*/

td .button-like:hover svg.icon {
	color : var(--table-hover-active-color);
}

td .button-like.pressed svg.icon,.button-like.pressed:hover svg.icon {
	padding-left : 1px;
	padding-top : 1px;
}

.popup {
	display: flex;
	flex-direction: column;
	position: absolute;
	top: 0;
	left: 0;
	-width: 832px;
	-height: 624px;
	min-width: 100px;
	min-height: 50px;
	max-width: 90vw;
	max-height: 90vh;
	color: var(--main-text-color);
	background-color: var(--main-bg-color);
	border: 4px double var(--popup-border-color);
	border-radius: 0.5em 0.5em 0 0;
	box-shadow: 2px 4px 8px 4px rgba(43,54,13,0.4);
	overflow: hidden;
}

@media all and (max-width: 824px) {
	.popup {
		width: calc(100vw - 8px);
		left: 0;
	}
}

@media all and (max-height: 616px) {
	.popup {
		height: calc(100vh - 8px);
		top: 0;
	}
}

.popup header {
	margin: 0;
	position: relative;
	padding: 0.6em 1.25em;
	margin: -1px -1px 0 -1px;
	height: 1.1em;
	flex-shrink: 0;
	overflow: hidden;
	color: var(--popup-header-text-color);
	background-color: var(--popup-header-bg-color);
	border-radius: calc(0.5em - 2px) calc(0.5em - 2px) 0 0;
}

.popup header svg.icon {
	width : 1em;
	height : 1em;
	vertical-align : -0.2em;
}

.popup header h2 {
	cursor: default;
	user-select: none;
}

.popup header button.iconic {
	display: block;
	position: absolute;
	top: 0.7em;
	right: 1.25em;
}

.popup header button.iconic:hover {
	color : var(--popup-header-active-color);
}

.popup article {
	flex-grow: 1;
	margin: 1em 1.2em 0 1.2em;
	overflow: auto;
}

.popup.frameless article {
	margin : 0;
}

.popup section h2, .popup article h2 {
	text-align : center;
	font-size : 1.2em;
	margin-top: 1.2em;
	margin-bottom: 1.2em;
}

.popup h3 {
	font-weight: bolder;
}

.popup h3, .popup :not(form):not(td) > p:not(:last-child), .popup > p:not(:last-child), .popup table:not(:last-child) {
	margin-bottom: 1em;
}

.popup p.warning, .popup p.error {
	margin-top : 0.5em;
	font-style : italic;
	width : 32em;
}

.popup p.error {
	color : var(--theme-alarm-color);
}

.popup footer {
	margin: 2em 1.2em 1em 1.2em;
	padding: 0;
	text-align: center;
	flex-shrink: 0;
}

.popup .slider {
	position : absolute;
	bottom : 0;
	white-space : nowrap;
	overflow : hidden;
	background : rgba(0,0,0,0.67);
	padding : 2px;
	margin-bottom : 16px;
	width : calc(100% - 16px);
	height : 130px;
	scroll-behavior : smooth;
	opacity : 0;
	transition : opacity 0.5s;
}

.popup .slider:hover {
	opacity : 1;
}

.popup .slider img {
	margin : 2px;
	cursor : pointer;
	opacity : 0.5;
	vertical-align : middle;
}

.popup .slider img:hover {
	transition : opacity 0.5s;
	opacity : 1;
}

.popover {
	position: absolute;
	color : var(--main-text-color);
	background: var(--main-bg-color);
	border: 1px solid var(--popup-border-color);
	box-shadow: 2px 2px 6px var(--theme-dark-color);
	padding: 0.5em 1em;
}

menu.popover {
	right: calc(100% + 4px);
	top: 2px;
	padding: 0.5em 0.15em;
}

menu.popover li {
	padding: 0 0.85em;
	list-style: none;
	cursor: pointer;
}

menu.popover li:hover {
	color : var(--button-focus-fg-color);
	background-color : var(--button-focus-bg-color);
}

#gallery-back-button,#gallery-on-button,#gallery-rotate-left-button,#gallery-rotate-right-button {
	position : absolute;
	top : calc(50% - 64px);
	cursor : pointer;
	opacity : 0;
	transition : opacity 0.5s;
}

#gallery-back-button {
	left : 16px;
}

#gallery-on-button {
	right : 16px;
}

#gallery-rotate-left-button {
	left : calc(50% - 70px);
}

#gallery-rotate-right-button {
	left : 50%;
}

#gallery-back-button.disabled,#gallery-on-button.disabled {
	display : none;
}

:hover > #gallery-back-button,:hover > #gallery-on-button,:hover > #gallery-rotate-left-button,:hover > #gallery-rotate-right-button {
	opacity : 0.33;
}

#gallery-back-button:hover,#gallery-on-button:hover,#gallery-rotate-left-button:hover,#gallery-rotate-right-button:hover {
	opacity : 1;
}

body.index {
	margin: 0;
	color: var(--entry-text-color);
	background-color: var(--entry-bg-color);
}

body.index > header {
	display : grid;
	grid-template-columns : max-content 1fr;
	align-items : center;
	padding : 10pt 52pt;
}

body.index > header img {
	margin-right : 36pt;
}

body.index header h1 {
	text-align : center;
}

body.index main {
	display : grid;
	grid-template-columns : 1fr min-content;
	align-items : center;
	margin : 0;
	padding : 24pt 52pt;
}

body.index #decoration {
	padding-right : 36pt;
}

body.index #decoration img {
	width : 100%;
	height : auto;
}

body.index #content {
	align-self : stretch;
	display : flex;
	flex-direction : column;
	text-align : center;
}

body.index #content > * {
	flex-grow : 1;
	display : flex;
	flex-direction : column;
	justify-content : center;
	align-items : center;
}

body.index button {
	border-radius: 15px;
	padding: 6px 30px;
}

body.index button:active {
	box-shadow: none;
}

body.index input {
	width: 12em;
	padding: 5px 10px 3px 10px;
	border-radius: 15px;
}

#logon-form, #register-form, #reset-password-form {
	margin: 20px 0 40px 0;
	padding: 30px 60px;
	border: 3px solid var(--border-color);
	border-radius: 20px;
}

body.index #logon-form, body.index #register-form, body.index #reset-password-form {
	align-items : flex-end;
}

#logon-form p, #register-form p, #reset-password-form p {
	margin : 0;
}

#logon-form p.center, #register-form p.center, #reset-password-form p.center {
	align-self : center;
}

#logon-form p + p:not(:empty), #register-form p + p:not(:empty), #reset-password-form p + p:not(:empty) {
	margin-top: 1em;
}

#cover {
	width: 100vw;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	background: transparent;
}

#bus-list th:last-child,#bus-list td:last-child {
	border-left: none;
}

#bus-list th:nth-last-child(2),#bus-list td:nth-last-child(2) {
	border-right: none;
}

#bus-list td:nth-child(2),#bus-list td:nth-child(3),#bus-list td:nth-child(5) {
	text-align: center;
}

#bus-list td:nth-child(4) {
	text-align: right;
}

#bus-list td:last-child {
	width: 17px;
}

#route-data-content td:first-child {
	max-width: 50%;
}

article.scrollable, #carrier-summary-list {
	overflow-x : auto;
}

#monitoring-summary-table, #monitoring-ages-table {
	width : unset;
	min-width : 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: none;
	border-bottom : 1px solid var(--table-border-color);
}

#monitoring-summary-table thead, #monitoring-summary-table tbody, #monitoring-summary-table tfoot,
#monitoring-ages-table thead, #monitoring-ages-table tbody, #monitoring-ages-table tfoot {
	color : var(--table-prim-text-color);
	background-color : var(--table-prim-bg-color);
}

#monitoring-summary-table tbody tr:nth-child(odd), #monitoring-summary-table th, #monitoring-summary-table td,
#monitoring-ages-table tbody tr:nth-child(odd), #monitoring-ages-table th, #monitoring-ages-table td {
	color : inherit;
	background-color: inherit;
}

#monitoring-ages-table tbody tr.selected {
	color : var(--table-selected-text-color);
	background-color: var(--table-selected-bg-color);
}

#monitoring-ages-table tbody tr.selected td {
	color : var(--table-selected-text-color);
	background-color: var(--table-selected-bg-color);
	border-color: var(--table-selected-border-color);
}

#monitoring-summary-table tbody tr:hover, #monitoring-ages-table tbody tr:hover {
	color : var(--table-hover-text-color);
	background-color: var(--table-hover-bg-color);
	border-color: var(--table-hover-border-color);
}

#monitoring-summary-table thead tr:first-child th:nth-child(2), #monitoring-ages-table thead tr:first-child th:nth-child(2) {
	text-align : left;
}

#monitoring-summary-table th span, #monitoring-ages-table th span {
	font-size : inherit;
	font-style : inherit;
	font-weight : inherit;
}

#monitoring-summary-table thead th span {
	position : sticky;
	left : calc(50% - 4em);
}

#monitoring-ages-table thead th span {
	position : sticky;
	left : calc(50% - 9.8em);
}

#monitoring-summary-table th, #monitoring-summary-table td,
#monitoring-ages-table th, #monitoring-ages-table td {
	border: 1px solid var(--table-border-color);
	border-right : none;
	border-bottom: none;
}

#monitoring-summary-table th, #monitoring-summary-table td {
	min-width : 6em;
}

#monitoring-summary-table th.narrow, #monitoring-summary-table td.narrow {
	min-width : 2em;
}

#monitoring-ages-table th, #monitoring-ages-table td {
	min-width : 2em;
}

#monitoring-summary-table thead tr:last-child th, #monitoring-summary-table thead tr:first-child th:first-child, #monitoring-summary-table thead tr:first-child th:last-child, #monitoring-summary-table tbody tr:last-child td, #monitoring-summary-table tbody tr:last-child th,
#monitoring-ages-table thead tr:last-child th, #monitoring-ages-table thead tr:first-child th:first-child, #monitoring-ages-table thead tr:first-child th:last-child, #monitoring-ages-table thead tr:first-child th:nth-last-child(2), #monitoring-ages-table tbody tr:last-child td, #monitoring-ages-table tbody tr:last-child th {
	border-bottom: 1px solid var(--table-border-color);
}

#monitoring-summary-table thead tr:first-child th:nth-child(2), #monitoring-summary-table thead th:first-child, #monitoring-summary-table td:nth-child(2),
#monitoring-ages-table thead tr:first-child th:nth-child(2), #monitoring-ages-table thead th:first-child, #monitoring-ages-table td:nth-child(2) {
	border-left : none;
}

#monitoring-summary-table thead tr:first-child th:first-child, #monitoring-summary-table :not(thead) tr th:first-child, #monitoring-summary-table td:first-child,
#monitoring-ages-table thead tr:first-child th:first-child, #monitoring-ages-table :not(thead) tr th:first-child, #monitoring-ages-table td:first-child {
	width : 16em;
	min-width : 16em;
	max-width : 16em;
	position : sticky;
	left: 0;
	border-left : none;
	border-right : 1px solid var(--table-border-color);
}

#monitoring-summary-table thead tr:first-child th:last-child, #monitoring-summary-table :not(thead) tr th:last-child, #monitoring-summary-table td:last-child,
#monitoring-ages-table thead tr:first-child th:last-child, #monitoring-ages-table :not(thead) tr th:last-child, #monitoring-ages-table td:last-child,
#monitoring-ages-table thead tr:first-child th:nth-last-child(2), #monitoring-ages-table :not(thead) tr th:nth-last-child(2), #monitoring-ages-table td:nth-last-child(2) {
	position : sticky;
}

#monitoring-summary-table thead tr:first-child th:last-child, #monitoring-summary-table :not(thead) tr th:last-child, #monitoring-summary-table td:last-child {
	width : 8em;
	min-width : 8em;
	max-width : 8em;
}

#monitoring-ages-table thead tr:first-child th:last-child, #monitoring-ages-table :not(thead) tr th:last-child, #monitoring-ages-table td:last-child,
#monitoring-ages-table thead tr:first-child th:nth-last-child(2), #monitoring-ages-table :not(thead) tr th:nth-last-child(2), #monitoring-ages-table td:nth-last-child(2) {
	width : 6em;
	min-width : 6em;
	max-width : 6em;
}

#monitoring-summary-table thead tr:first-child th:last-child, #monitoring-summary-table :not(thead) tr th:last-child, #monitoring-summary-table td:last-child,
#monitoring-ages-table thead tr:first-child th:last-child, #monitoring-ages-table :not(thead) tr th:last-child, #monitoring-ages-table td:last-child {
	right: 0;
}

#monitoring-ages-table thead tr:first-child th:nth-last-child(2), #monitoring-ages-table :not(thead) tr th:nth-last-child(2), #monitoring-ages-table td:nth-last-child(2) {
	right: calc(7em + 1px);
}

#monitoring-summary-table tfoot th, #monitoring-ages-table tfoot th {
	text-align: left;
}

#shedule-orders-table td {
	white-space : pre-line;
}

#shedule-orders-table td.idle-left, #shedule-orders-table td.idle-right {
	background-color : var(--theme-main-color);
	border-top-width : 3px;
	border-bottom-width : 3px;
}

#shedule-orders-table tr:nth-child(4n) td.idle-left, #shedule-orders-table tr:nth-child(4n) td.idle-right,
#shedule-orders-table tr:nth-child(4n+3) td.idle-left, #shedule-orders-table tr:nth-child(4n+3) td.idle-right {
	background-color: var(--theme-medium-color);
	border-color: var(--theme-semi-dark-color);
}

#shedule-orders-table tr:hover:hover td.idle-left, #shedule-orders-table tr:hover:hover td.idle-right {
	background-color: var(--theme-sec-semi-dark-color);
	border-color: var(--theme-sec-dark-color);
}

#shedule-orders-table td.idle-left {
	border-left-width : 3px;
}

#shedule-orders-table td.idle-right {
	border-right-width : 3px;
}
