/* kobets.info header — минимальные стили, одна строка на смартфоне */

.kobets-header {
  background: #1a1a2e;
  color: #eee;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Полоса шапки ограничена по ширине и центрирована (одна команда подключения — единый вид на всех страницах) */
.kobets-header.kobets-header--contained {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.kobets-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
}

/* Четыре контрола: Проект, Реалм, Пользователь, Время — единый вид: бокс со скруглёнными углами */
.kobets-header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
}

.kobets-header-ctrl {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-sizing: border-box;
  cursor: default;
}

/* Заголовков у контролов нет (HEADER-CONTENT-RULES); скрываем на случай старого кэша */
.kobets-header-ctrl__label {
  display: none !important;
}

.kobets-header-ctrl__value {
  font-size: 0.95em;
  color: #eee;
  min-height: 1.4em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.kobets-header-ctrl__link {
  color: #8ab4f8;
  text-decoration: none;
  font-weight: 500;
}

.kobets-header-ctrl__link:hover {
  text-decoration: underline;
}

/* Блок пользователя (третий контрол): имя + крестик выхода */
.kobets-header-user-block {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kobets-header-user-name {
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kobets-header-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 1.1em;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.kobets-header-logout-btn:hover {
  background: rgba(220, 80, 80, 0.4);
  color: #fff;
}

.kobets-header-auth--anonymous,
.kobets-header-auth--pending {
  color: #999;
  margin-right: 0.25em;
}

.kobets-header-auth--pending {
  font-style: italic;
}

.kobets-header-auth--revoked {
  color: #a66;
  margin-right: 0.25em;
}

.kobets-header-login {
  color: #6ab;
  text-decoration: none;
  white-space: nowrap;
}

.kobets-header-login:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .kobets-header-inner {
    padding: 0.4rem 0.6rem;
    font-size: 13px;
  }

  .kobets-header-controls {
    gap: 0.4rem 0.5rem;
  }

  .kobets-header-ctrl {
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
  }

  .kobets-header-user-name {
    max-width: 6em;
  }
}

@media (max-width: 380px) {
  .kobets-header-user-name {
    max-width: 4em;
  }
}
