/* ============================================================
   Sekai — topbar.css
   Три стеклянные панели: логотип+навигация, поиск, профиль.
============================================================ */

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

/* Секции внутри общего окна (без собственных рамок) */
.topbar-panel {
  height: 100%;
  display: flex;
  align-items: center;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

/* ============================================================
   ЛЕВАЯ ПАНЕЛЬ — логотип + навигация
============================================================ */
.topbar-left {
  flex-shrink: 0;
  gap: 18px;
  padding: 0 12px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-logo-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e6edff;
  filter: drop-shadow(0 0 10px rgba(140, 170, 255, 0.75));
}

.topbar-logo-mark svg {
  width: 20px;
  height: 20px;
}

.topbar-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Навигация */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.topbar-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  position: relative;
}

.topbar-nav-item:hover {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-line);
}

.topbar-nav-item.active {
  color: var(--text);
  font-weight: 500;
  background: rgba(79, 125, 255, 0.16);
  border-color: rgba(125, 155, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.topbar-nav-item svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.5;
  opacity: 0.85;
  flex-shrink: 0;
}

/* ============================================================
   ЦЕНТРАЛЬНАЯ ПАНЕЛЬ — поиск
============================================================ */
.topbar-center {
  flex: 1;
  min-width: 0;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 8px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-pill);
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--t);
}

.topbar-search:hover {
  border-color: rgba(125, 155, 255, 0.42);
  color: var(--text-2);
  background: rgba(79, 125, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(79, 125, 255, 0.07);
}

.topbar-search svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  opacity: 0.8;
  flex-shrink: 0;
}

.topbar-search-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search kbd {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-3);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* ============================================================
   ПРАВАЯ ПАНЕЛЬ
============================================================ */
.topbar-actions {
  flex-shrink: 0;
  gap: 8px;
  padding: 0 8px 0 10px;
}

/* Иконки-кнопки */
.topbar-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-line);
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  flex-shrink: 0;
}

.topbar-icon:hover {
  background: rgba(79, 125, 255, 0.14);
  border-color: rgba(125, 155, 255, 0.40);
  color: var(--text);
  transform: translateY(-1px);
}

.topbar-icon:active { transform: scale(0.94); }

.topbar-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.6;
}

.topbar-icon-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f7dff;
  border: 2px solid rgba(8, 12, 26, 0.95);
  box-shadow: 0 0 10px rgba(79, 125, 255, 0.9);
}

/* Профиль */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  background: rgba(79, 125, 255, 0.12);
  border: 1px solid rgba(125, 155, 255, 0.26);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-user:hover {
  border-color: rgba(125, 155, 255, 0.48);
  background: rgba(79, 125, 255, 0.20);
  box-shadow: 0 6px 20px rgba(40, 70, 200, 0.28);
}

.topbar-user:active { transform: scale(0.98); }

.topbar-user-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 125, 255, 0.85), rgba(139, 92, 246, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  letter-spacing: -0.3px;
  box-shadow: 0 4px 14px rgba(79, 125, 255, 0.40);
}

.topbar-user-ava svg {
  width: 15px;
  height: 15px;
  opacity: 0.95;
}

.topbar-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-caret {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ============================================================
   АДАПТИВ
============================================================ */
@media (max-width: 1350px) {
  .topbar-nav-item span { display: none; }
  .topbar-nav-item { padding: 8px 10px; }
  .topbar-left { gap: 12px; }
}

@media (max-width: 1100px) {
  .topbar-search kbd { display: none; }
  .topbar-center { max-width: 320px; }
}

@media (max-width: 900px) {
  .topbar-user-name,
  .topbar-user-caret { display: none; }
  .topbar-user { padding: 5px; }
  .topbar-search-text { display: none; }
  .topbar-search { justify-content: center; padding: 11px 14px; }
  .topbar-title { letter-spacing: 2px; }
}
