/*
 * ## CSS Reset
 */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. Remove default margin */
* {
    margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
    html {
	interpolate-size: allow-keywords;
    }
}

body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
    font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* 10. Create a root stacking context */
#root, #__next {
    isolation: isolate;
}





/*
 * ## Fonts
 */
@font-face {
  font-family: 'Prosto One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(Prosto.woff2) format('woff2');
}






/*
 * ## Variables
 */
:root {
    --blue-accent: #0C50BB;
    --blue-accent-hover: #1065E5;
    --blue-accent-faint: #C9DDFF;
    --blue-accent-invert: #FFFFFF;

    --green-accent: #009846;
    --green-accent-hover: #35b962;
    --green-accent-text: #005323;
    --green-accent-faint: #c0ecc8;
    --green-accent-invert: #FFFFFF;

    --red-accent: #E31D24;
    --red-accent-text: #891f1c;
    --red-accent-faint: #ffd8d3;
    --red-accent-invert: #FFFFFF;

    --text-main: black;
    --text-muted: #5B5B5B;

    --border-faint: #d0d0d0;

    --system-ui: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --brand-font: "Prosto One";
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.3rem;
    --font-size-xl: 1.5rem;

    --content-spacing: 16px; /* left and right padding for main and footer sections */
}






/*
 * ## Global styles
 */
::selection {
    background-color: var(--blue-accent);
    color: white;
}

html, body {
    height: 100%;
    flex-direction: column;
}

header, footer {
    flex-shrink: 0;
}

footer {
    color: var(--text-muted);
    padding-inline: 48px;
}

main {
    flex: 1 0 auto;
}

body {
    font-family: var(--system-ui);
    max-width: 44rem;
    margin-inline: auto;

    display: flex;
}

input:user-invalid {
    background-color: var(--red-accent-faint);
    border-color: var(--red-accent);
}

input, button, .button-link, textarea {
    display: block;
    padding: 8px;
    border-radius: 4px;
}

fieldset {
    border: none;
    padding: 0;
}

input, textarea {
    border: 1px solid var(--blue-accent);
}

textarea.form-control {
    resize: vertical;
}

.button-link {
    text-align: center;
}

input:focus,
button:focus,
.button-link:focus,
textarea:focus {
    outline: 3px solid var(--blue-accent-faint);
}

input::placeholder {
    color: var(--text-muted);
}

input.hide-arrows::-webkit-outer-spin-button,
input.hide-arrows::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input.hide-arrows {
    -moz-appearance: textfield;
    appearance: textfield;
}

button {
    cursor: pointer;
    text-transform: uppercase;
    font-size: var(--font-size-lg);
    padding: 6px 16px;
}

button svg {
    fill: currentColor;
    margin-inline: auto;
}

button.primary {
    color: white;
    background-color: var(--blue-accent);
    border: 1px solid var(--blue-accent);
    position: relative;
}

button.primary span {
    position: relative;
    z-index: 2;
}

button.primary:hover {
    background-color: var(--blue-accent-hover);
}

button.primary:before {
    z-index: 1;
    position: absolute;
    content: "";
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: #06275e;
    transition: width 1.5s cubic-bezier(0.61, 0.21, 0.83, 0.36);
}

button.primary.loading:before {
    width: 100%;
}


button.green {
    color: white;
    background-color: var(--green-accent);
    border: 1px solid var(--green-accent);
}

button.green:hover {
    background-color: var(--green-accent-hover);
}

a, a.no-visited {
    text-decoration: none;
    color: var(--blue-accent);
}

a:not(.button-link):focus {
    outline: 2px solid var(--blue-accent-faint);
    border-radius: 4px;
}

.table {
    border-collapse: collapse;
}

.table tr {
    border-top: 1px solid var(--border-faint);
    border-bottom: 1px solid var(--border-faint);
}

.table tr.no-top-border {
    border-top: none;
}

.table td {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-inline: 4px;
}

td.table-key {
    width: 40%;
}

.page-title {
    font-weight: normal;
    font-family: var(--brand-font);
    font-size: var(--font-size-xl);
    color: var(--blue-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-submit-success {
    border-radius: 5px;
    border: 1px solid var(--green-accent-faint);
    background-color: var(--green-accent-faint);
    color: var(--green-accent-text);
    padding: 8px 8px;
}





/*
 * ## Utility classes
 */
.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-8 {
    margin-bottom: 32px;
}

.margin-centered {
    margin-inline: auto;
}

.text-muted {
    color: var(--text-muted);
}

.cell-centered {
    text-align: center;
    place-self: center;
}

.relative {
    position: relative;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

.nowrap {
    white-space: nowrap;
}

.brand-font {
    font-family: var(--brand-font);
}

.form-label {
    display: block;
}

.form-control {
    width: 100%;
}

a.main-text {
    color: var(--text-main);
}

.two-column {
    display: grid;
}

path.fill-primary {
    fill: var(--blue-accent);
}





/*
 * ## Tagged section component
 */
.tagged-section {
    position: relative;
    border-top: 2px solid var(--blue-accent);
}

.tagged-section::before {
    content: attr(data-tag-title);
    position: absolute;
    top: 0;
    right: 32px;
    line-height: 1.5;
    font-family: var(--brand-font);
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    text-transform: uppercase;
}

.tagged-section.tag-blue::before {
    background-color: var(--blue-accent);
    color: var(--blue-accent-invert);
}

.tagged-section.tag-green::before {
    background-color: var(--green-accent);
    color: var(--green-accent-invert);
}

.tagged-section.tag-xl {
    padding-block: 32px;
}

.tagged-section.tag-xl::before {
    padding-inline: 8px;
}

.tagged-section.tag-xs {
    padding-block: 16px;
}

.tagged-section.tag-xs::before {
    font-size: var(--font-size-xs);
    padding-inline: 4px;
}




/*
 * ## Header component
 */
.lk-head {
    display: flex;
    align-items: center;
    color: var(--blue-accent-invert);
    background-color: var(--blue-accent);
}

.lk-head-title {
    flex-grow: 1;
    text-align: center;
}

.exit-button {
    border: none;
    background: transparent;
    align-self: stretch;
    padding: 4px;
    color: #eee;
}

.exit-button:hover {
    color: var(--blue-accent-invert);
}

header {
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 16px;
}

header .logo {
    max-width: 13vw;
}

header .title {
    font-family: var(--brand-font);
    font-weight: normal;
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.25;
    text-transform: uppercase;
    flex-grow: 1;
}

#menu-button {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0;
    border-left: 2px solid var(--text-muted);
    outline: none;
}

#menu-button:hover {
    color: black;
}

#menu-button .button-icon {
    width: 48px;
    height: 48px;
}





/*
 * ## Navigation component
 */
nav {
    display: none;
    position: absolute;
    top: -1px;
    right: 5px;
    background-color: white;
    border: 1px solid var(--blue-accent);
    padding: 16px;
    font-family: var(--brand-font);
    text-transform: uppercase;
    z-index: 10;
}

nav.expand {
    display: block;
}

nav a {
    display: block;
    color: var(--text-muted);
    border-bottom: 1px solid var(--text-muted);
    margin-bottom: 4px;
    margin-top: 8px;
    padding-inline: 4px;
}

nav a:first-child {
    margin-top: 0;
}

nav a:hover,
nav a.active {
    color: var(--blue-accent);
    border-color: var(--blue-accent);
}





/*
 * ## Modal dialog component
 */
dialog {
    margin: auto;
    border: 1px solid var(--blue-accent-faint);
    border-radius: 5px;
    padding: 0;
}

dialog::backdrop {
    background-color: rgba(3, 23, 59, 0.4);
}

x-dialog-title {
    display: flex;
    padding: 8px 16px;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--blue-accent-faint);
}

x-dialog-title h2 {
    font-weight: normal;
    font-size: 1.25rem;
}

x-dialog-title button {
    box-sizing: content-box;
    border: none;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000' %3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    font-weight: normal;
    width: 1rem;
    height: 1rem;
    padding: .5rem .5rem;
    margin: -.5rem -.5rem -.5rem auto;
    color: #000;
    opacity: 0.5;
}

x-dialog-title button:hover {
    opacity: 0.75;
}

x-dialog-body, x-dialog-footer {
    display: block;
    padding: 16px;
}

x-dialog-footer {
    padding-top: 0;
}




/*
 * ## Foldable component
 */
x-foldable {
    display: block;
}

x-foldable-body {
    display: block;
    overflow: hidden;
}

x-foldable[open] x-foldable-body {
    max-height: 10000px !important;
}

x-foldable-handle svg {
    fill: var(--blue-accent);
}

x-foldable-handle {
    margin-top: 4px;
    padding-inline: 4px;
    border-top: 1px solid var(--blue-accent);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    text-transform: uppercase;
    color: var(--blue-accent);
    font-size: var(--font-size-xs);
    cursor: pointer;
    position: relative;
}




/*
 * ## Login page
 */

.welcome-text {
    line-height: 1.25;
    margin-top: 16px;
    margin-bottom: 8px;
}

.welcome-text, .form-help-text {
    color: var(--text-muted);
    font-weight: normal;
    text-align: center;
}

.form-help-text {
    font-size: var(--font-size-sm);
    margin-bottom: 24px;
}

.form-error {
    border-radius: 5px;
    border: 1px solid var(--red-accent-faint);
    background-color: var(--red-accent-faint);
    color: var(--red-accent-text);
    padding: 8px 8px;
}

.login-form {
    margin-bottom: 24px;
}




/*
 * ## Balance component
 */
.balance-row {
    display: flex;
    gap: 8px;
    font-size: var(--font-size-lg);
    padding: 6px 4px;
    border: 1px solid var(--blue-accent-faint); /* align with button */
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: var(--blue-accent-faint);
}

.balance-value {
    font-weight: 600;
}




/*
 * ## "What login" page
 */
.whatlogin-list {
    padding-inline-start: 40px;
}

.whatlogin-phone {
    font-size: var(--font-size-xl);
    display: flex;
    gap: 4px;
    align-items: center;
    margin-inline-start: 36px;
}

.whatlogin-phone svg {
    width: 24px;
}

.whatlogin-icons {
    display: flex;
    gap: 8px;
    margin-inline-start: 40px;
}

.whatlogin-icons svg {
    width: 75px;
}




/*
 * ## Contact page
 */
.contact-item {
    line-height: 1.2;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item svg.branded-icon {
    width: 20px;
    height: 20px;
    margin-inline: 2px;
}

.contact-item svg.icon {
    width: 24px;
    height: 24px;
}

.contact-item > .main-text {
    align-self: baseline;
}

.contact-item .main-text {
    display: block;
}

.contact-link {
    display: block;
    color: var(--text-main);
    margin-bottom: 8px;
}

.departments {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 24px;
    overflow-x: auto;
}

.department {
    background-color: var(--blue-accent-faint);
    border-radius: 15px;
    color: var(--blue-accent);
    text-align: center;
    padding: 16px 32px;
    font-size:var(--font-size-sm);
    line-height: 1.2;
    min-width: 200px;
    position: relative;
}

.department .icon {
    position: absolute;
    top: 4px;
    left: 2px;
    width: 32px;
    height: 32px;
}

.department > div {
    margin-bottom: 16px;
}

.department > div:last-child {
    margin-bottom: 0;
}

.department-title {
    font-weight: bold;
    min-height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}




.svg-red-accent {
    fill: var(--red-accent);
}
.svg-red-accent-invert {
    fill: var(--red-accent-invert);
}

x-input-group {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

x-input-group input {
    width: auto;
}

x-contract-status {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-stat {
    width: 100%;
}

.table-stat-sum {
    text-align: right;
}

.promised-pay-link {
    display: flex;
    gap: 4px;
    text-transform: uppercase;
    align-items: center;
    justify-content: center;
}

.promised-pay-link svg {
    width: 16px;
    stroke: currentColor;
    stroke-width: 3px;
    fill: none;
}

.news-item {
    position: relative;
}

.bell-icon {
    width: 40px;
    height: 40px;
    display: inline;
    vertical-align: middle;
}

.short-news {
    position: relative;
}

.bell-icon-short {
    width: 32px;
    height: 32px;
    position: absolute;
    top: 18px;
    right: 12px;
}

.news-item-title {
    line-height: 1.25;
}

.news-item-bell {
    display: inline;
    height: 12px;
    width: 12px;
    margin-inline: 4px;
}

.news-item-content {
    padding-left: 4px;
    line-height: 1.25;
}

.company-footer {
    padding-block: 16px;
    line-height: 1.2;
}





/*
 * ## Media query (PWA)
 */
@media (display-mode: standalone) or (display-mode: minimal-ui) or (display-mode: fullscreen) {
    .lk-head {
	display: none;
    }
}




/*
 * ## Media query (ONLY mobile)
 */
@media screen and (max-width: 36rem) {
    /*
     * Draw a separator line between contacts and details block.
     */
    .company-footer .company-details {
	position: relative;
    }
    .company-footer .company-details::after {
	content: ' ';
	position: absolute;
	top: 0;
	left: 10%;
	width: 80%;
	margin-inline: auto;
	border-top: 1px solid var(--text-muted);
    }

    .tagged-section.tag-green::before {
	right: 12px;
    }
}





/*
 * ## Media query (ONLY tablet)
 */
@media screen and (min-width: 36rem) and (max-width: 44rem) {
}





/*
 * ## Media query (ONLY desktop)
 */
@media screen and (min-width: 44rem) {
    header .title {
	font-size: 2rem;
    }

    .company-footer {
	font-size: var(--font-size-xs);
	display: flex;
	gap: 8px;
	justify-content: space-between;	
    }

    .short-news {
	width: max-content;
	margin-inline: auto;
    }

    .login-form {
	max-width: 50%;
	margin-inline: auto;
    }
}





/*
 * ## Media query (ONLY mobile AND tablet)
 */
@media screen and (max-width: 44rem) {
    main {
	padding-inline: var(--content-spacing);
    }

    .company-footer {
	text-align: center;
    }
    
    .company-footer .contacts {
	font-size: var(--font-size-sm);
    }

    .company-footer .contacts .contact-row {
	padding-block: 4px;
	line-height: 1;
    }
   
    .company-footer .company-details {
	font-size: var(--font-size-xs);
	/*
	 * Use this weird spacing in order to draw separator line between blocks
	 * in mobile view.
	 */
	margin-top: 8px;
	padding-top: 8px;
    }
}






/*
 * ## Media query (ONLY tablet AND desktop)
 */
@media screen and (min-width: 36rem) {
    .company-footer {
	border-top: 2px solid var(--blue-accent);
    }

    .tagged-section.tag-xl::before {
	font-size: var(--font-size-lg);
    }

    .login-form {
	max-width: 60%;
	margin-inline: auto;
    }

    .two-column {
	column-gap: 16px;
	grid-template-columns: 1fr 1fr;
    }

    .two-column .grid-align-bottom {
	place-self: end stretch;
    }
}
