/* Раніше ці змінні приходили з public/theme/<color>.css — повного стилю
   Element UI 2, який вантажився в рантаймі й перебивав Element Plus. Тему
   прибрано, тож прив'язуємо власні назви до палітри Element Plus. */
:root {
  --color-primary: var(--el-color-primary);
  --color-success: var(--el-color-success);
  --color-warning: var(--el-color-warning);
  --color-danger: var(--el-color-danger);
  --color-info: var(--el-color-info);
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', SimSun,
    sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

#nprogress .bar {
  background: var(--color-primary) !important;
}

.logo {
  text-align: center;
  width: 100%;
}

.logo a {
  color: white;
}

/* Sidebar app title: 30% smaller than the default h1 size (2em). */
#app .el-aside .logo {
  font-size: 1.4em;
}

.el-header {
  background-color: var(--el-bg-color);
  border-bottom: 1px solid var(--el-border-color-light);
}

/* Page title in the top bar (to the right of the sidebar logo): 30% smaller
   than the default h1 size (2em). */
#app .el-header h1 {
  font-size: 1.4em;
}

.el-header .header-actions {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.el-aside {
  background-color: #001529;
  border-right: solid 1px #e6e6e6;
  min-height: 100vh;
}

/* Element Plus більше не приймає props background-color / text-color на
   el-menu — кольори задаються змінними. Окрім змінних дублюємо колір прямою
   властивістю: так пункти меню лишаються темними навіть якщо якась тема
   перевизначить background-color на самому .el-menu. */
.el-menu-side-nav,
#app .el-aside .el-menu {
  --el-menu-bg-color: #001529;
  --el-menu-text-color: rgba(255, 255, 255, 0.65);
  --el-menu-hover-bg-color: #000c17;
  --el-menu-hover-text-color: #ffffff;
  --el-menu-active-color: #ffffff;
  --el-menu-border-color: transparent;
  background-color: #001529;
}

#app .el-aside .el-menu-item,
#app .el-aside .el-sub-menu__title {
  color: rgba(255, 255, 255, 0.65);
}

#app .el-aside .el-menu-item:hover,
#app .el-aside .el-sub-menu__title:hover {
  background-color: #000c17;
  color: #ffffff;
}

.el-menu {
  border-right: 0px !important;
  height: calc(100% - 60px);
}

.el-header .el-dropdown-link-body {
  cursor: pointer;
  height: 60px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

.el-header .el-dropdown-link-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.el-main {
  background-color: var(--el-bg-color-page);
}

.el-header .i18n-select {
  margin-right: 24px;
}

.el-aside {
  flex-shrink: 0;
}

.el-menu-side-nav {
  flex-shrink: 0;
}

.el-menu-side-nav.hidden {
  display: none;
}

.el-menu-item.active {
  background-color: var(--color-primary) !important;
  color: white !important;
  outline: none;
  font-weight: bold;
}

.el-menu-item.active i {
  color: white !important;
}

.w-100 {
  width: 100%;
}

@media (max-width: 576px) {
  .hide-xs {
    display: none;
  }
}

.app-content-page {
  margin-top: 16px;
  padding: 24px;
  background: var(--el-bg-color);
  overflow-y: hidden;
  border-radius: 5px;
  border: 1px var(--el-border-color-light) solid;
}

#app .app-content-title {
  margin-top: 0;
  margin-bottom: 36px;
  font-size: 1em;
  color: var(--el-text-color-primary);
  font-weight: 500;
}

.app-page-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 48px;
}

.app-page-toolbar {
  margin-bottom: 24px;
}

.app-page-toolbar > * {
  margin-right: 8px !important;
  margin-bottom: 8px !important;
}

.app-page-toolbar .el-button {
  margin-bottom: 8px !important;
}

.app-page-toolbar .el-button + .el-button {
  margin-left: 0px;
}

.app-divider {
  display: table;
  white-space: nowrap;
  text-align: center;
  background: transparent;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  font-size: 16px;
  margin: 16px 0;

  display: block;
  height: 1px;
  width: 100%;
  margin: 24px 0;
  clear: both;

  position: relative;
  top: -0.06em;

  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #e8e8e8;
}

.app-avatar {
  border: 1px solid #fff;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-block;
  text-align: center;
  background: #ccc;
  color: #fff;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
}

.app-avatar > * {
  line-height: 32px;
  margin-left: 1px;
}

.app-avatar.app-avatar-sm {
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
}

.app-avatar.app-avatar-sm > * {
  line-height: 24px;
}

.app-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.el-row {
  flex-wrap: wrap;
}

/* Left menu: no scrollbar unless the menu really doesn't fit. The scrollbar
   used to be always on because .el-menu was sized calc(100% - 60px) *in
   addition to* the logo (an <h1> that is taller than 60px with its margins),
   so the aside content overflowed by a few pixels, and the Element theme sets
   overflow:auto on .el-aside. The menu now takes its natural height, and
   nothing scrolls horizontally. */
#app .el-aside .el-menu {
  height: auto;
}

#app .el-aside {
  overflow-x: hidden;
  overflow-y: auto;
}
