:root {
  --header: #189ea0;
  --sidebar: #b9e2e2;
  --sidebar-w: 92px;
  --header-min: 72px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Myriad Pro", "Segoe UI", "Liberation Sans", Arial, sans-serif;
  background: #fff;
  color: #1c2428;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-header {
  background: var(--header);
  color: #fff;
  flex: 0 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--header-min);
  padding: 8px 10px 8px 16px;
}

.header-spacer {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
}

.header-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(12px, 0.83vw, 24px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.header-title span {
  display: inline;
}

.header-title span + span::before {
  content: " ";
}

.header-actions {
  gap: 2px;
}

.header-btn,
.side-btn {
  position: relative;
  border: 0;
  line-height: 0;
  box-shadow: none;
}

.header-btn {
  padding: 2px;
  background: transparent;
}

.header-btn img {
  height: 42px;
  width: auto;
  display: block;
}

.header-btn:hover,
.header-btn:focus-visible,
.side-btn:hover,
.side-btn:focus-visible {
  background: transparent;
  opacity: 1;
}

.header-btn:hover img,
.header-btn:focus-visible img,
.side-btn:hover img,
.side-btn:focus-visible img {
  opacity: 0.75;
}

.header-btn::after,
.side-btn::after {
  content: attr(aria-label);
  position: absolute;
  z-index: 30;
  display: none;
  padding: 5px 8px;
  border-radius: 3px;
  background: #14383a;
  color: #fff;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(20, 40, 48, 0.25);
}

.header-btn:hover::after,
.header-btn:focus-visible::after {
  display: block;
  top: calc(100% + 4px);
  right: 0;
}

.side-btn:hover::after,
.side-btn:focus-visible::after {
  display: block;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.header-btn:focus-visible,
.side-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  opacity: 1;
}

.app-body {
  position: relative;
  min-height: calc(100vh - var(--header-min));
  min-height: calc(100dvh - var(--header-min));
}

.content-panel {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #d7e7ee;
  overflow: auto;
}

.content-panel img[src="/img/loader.gif"] {
  width: 40px;
  height: 40px;
  max-width: 40px;
  object-fit: contain;
}

.app-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.side-nav {
  pointer-events: auto;
  display: none;
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  bottom: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  width: var(--sidebar-w);
  height: 100%;
  background: var(--sidebar);
  padding: 20px 0 16px;
}

.side-nav.is-open {
  display: flex;
}

.side-btn {
  padding: 4px;
  background: transparent;
  text-decoration: none;
}

.side-btn img {
  width: 52px;
  height: auto;
  display: block;
}

.side-btn:focus-visible {
  outline-color: var(--header);
}

.side-btn.is-active,
.side-btn.is-active:hover,
.side-btn.is-active:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.55);
}

.submenu-panel {
  pointer-events: auto;
  display: none;
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: #fff;
  overflow: auto;
}

.submenu-panel.is-open {
  display: block;
}

.submenu-content {
  padding: 28px 24px;
}

.submenu-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--header);
}

.submenu-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.submenu-group {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1c2428;
}

.submenu-group:first-child {
  margin-top: 0;
}

.submenu-panel .submenu-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  background: var(--header);
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  border: 0;
  border-radius: 2px;
}

.submenu-panel .submenu-link:hover,
.submenu-panel .submenu-link:focus-visible {
  background: var(--header);
  color: #fff;
  opacity: 0.88;
}

@media (max-width: 991.98px) {
  :root {
    --sidebar-w: 60px;
  }

  .side-btn {
    padding: 2px;
  }

  .side-btn img {
    width: 40px;
  }

  .submenu-panel.is-open {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--sidebar-w);
    width: calc((100% - var(--sidebar-w)) * 0.9);
    height: auto;
  }
}

@media (min-width: 768px) {
  .header-title span {
    display: block;
  }

  .header-title span + span::before {
    content: none;
  }

  .header-btn img {
    height: 52px;
  }
}

@media (min-width: 992px) {
  .app {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .header-inner {
    min-height: 80px;
    padding: 6px 12px 6px 0;
  }

  .header-btn img {
    height: 58px;
  }

  .app-body {
    min-height: 0;
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
  }

  .content-panel {
    padding-left: var(--sidebar-w);
  }

  .app-overlay {
    flex-direction: row;
    align-items: stretch;
  }

  .side-nav,
  .side-nav.is-open {
    display: flex;
    position: static;
    z-index: auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    width: var(--sidebar-w);
    height: 100%;
    padding: clamp(72px, 14vh, 220px) 0 16px;
  }

  .side-btn img {
    width: 64px;
  }

  .submenu-panel.is-open {
    flex: 0 0 auto;
    width: 46%;
    max-width: 760px;
    height: 100%;
  }
}

@media (min-width: 1400px) {
  :root {
    --sidebar-w: 100px;
  }

  .side-btn img {
    width: 70px;
  }

  .header-btn img {
    height: 64px;
  }
}

@media (max-width: 575.98px) {
  .header-title {
    font-size: 11px;
  }

  .submenu-content {
    padding: 20px 16px;
  }
}

.app-header {
  position: relative;
  z-index: 5;
}

.info-modal[hidden] {
  display: none;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 48, 0.45);
}

.info-modal-card {
  position: relative;
  width: min(640px, 100%);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(20, 40, 48, 0.28);
  overflow: hidden;
}

.info-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--header, #189ea0);
  color: #fff;
}

.info-modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.info-modal-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.info-modal-card p {
  margin: 0;
  padding: 18px 16px 22px;
  color: #1c2428;
  font-size: 1.05rem;
  line-height: 1.45;
}
