/* Каркас приложения: боковая полоса, шапка, рабочая область.
 *
 * Перенос из прототипа, блок `sc-if value="{{ loggedIn }}"`. Объявления
 * дословные; всплывающая подсказка в прототипе переключалась состоянием
 * (`nv.tipDisp`), здесь это `:hover` — тот же вид, но без хранения
 * наведения в состоянии экрана.
 */

.shell {
  position: relative;
  height: 100vh;
  display: flex;
  background: #f4f6f8;
  font-size: 12.5px;
  overflow: hidden;
}

/* --- Боковая полоса ---------------------------------------------------- */

.shell-aside {
  width: 56px;
  flex: none;
  background: #fff;
  border-right: 1px solid #e3e7ec;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shell-aside__brand {
  height: 52px;
  flex: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eef1f4;
}

.shell-aside__mark {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 7px;
  background: #1f4fd8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 11px 'IBM Plex Mono', monospace;
}

.shell-nav {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.shell-nav__item {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: #5c6673;
}

.shell-nav__item[aria-current='page'] {
  background: #eef2fd;
  color: #1f4fd8;
}

/* Подсказка у пункта. В прототипе показывалась по наведению через
 * состояние; здесь то же самое делает CSS. */
.shell-nav__tip {
  position: absolute;
  left: 47px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  padding: 4px 9px;
  border-radius: 6px;
  background: #141a21;
  color: #fff;
  font: 500 11px 'IBM Plex Sans';
  white-space: nowrap;
  pointer-events: none;
  z-index: 60;
  box-shadow: 0 3px 10px rgba(20, 26, 33, 0.18);
}

.shell-nav__item:hover .shell-nav__tip,
.shell-nav__item:focus-visible .shell-nav__tip {
  display: block;
}

.shell-aside__bottom {
  margin-top: auto;
  width: 100%;
  padding: 11px 0;
  border-top: 1px solid #eef1f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.shell-avatar {
  width: 29px;
  height: 29px;
  flex: none;
  border: 0;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 10.5px 'IBM Plex Sans';
  cursor: pointer;
}

.shell-logout {
  flex: none;
  width: 29px;
  height: 26px;
  border: 1px solid #eef1f4;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b939d;
}

.shell-logout:hover {
  border-color: #dfe4e9;
  color: #141a21;
}

/* --- Шапка и рабочая область ------------------------------------------- */

.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shell-header {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #e3e7ec;
}

.shell-header__title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.shell-header__subtitle {
  font-size: 10.5px;
  color: #8b939d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-header__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* `display: flex` перебивает атрибут `hidden` — без этой строки скрытый
   чип остался бы на экране. */
.shell-status[hidden] {
  display: none;
}

.shell-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid #e3e7ec;
  border-radius: 20px;
  font: 400 10.5px 'IBM Plex Mono', monospace;
  color: #5c6673;
}

.shell-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #17a06a;
}

/* Связи нет. Цвет — тот же красный, что у отказов в прототипе. */
.shell-status--offline .shell-status__dot {
  background: #a4302a;
}

.shell-header__date {
  font: 400 10.5px 'IBM Plex Mono', monospace;
  color: #8b939d;
}

.shell-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* Содержимое экрана. В прототипе у каждого экрана свой контейнер; общий
 * нужен затем, чтобы каркас рисовался один раз, а не заново на каждый
 * переход — иначе на смене экрана мигала бы вся страница. */
.shell-screen {
  flex: 1;
  min-width: 0;
  display: flex;
  min-height: 0;
}
