:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --brand: #2563eb;
  --brand-soft: rgba(37, 99, 235, 0.12);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-lg: 22px;
  --sidebar-w: 78px;
  --topbar-h: 60px;
  --ask-h: 62px;
  --content-max-w: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  overflow: hidden;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100vw;
}

button,
input {
  font: inherit;
}

.app {
  height: 100dvh;
  display: flex;
}

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  flex: 0 0 var(--sidebar-w);
  z-index: 5;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 12px;
}

.sidebar__top {
  display: none;
}

.sidebar__menu {
  border: 0;
  background: transparent;
  min-height: 48px;
  width: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #0b1220;
  cursor: pointer;
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sidebar__settingsWrap {
  position: relative;
}

.theme-menu {
  position: absolute;
  left: calc(100% + 18px);
  bottom: -4px;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}

.theme-menu__header {
  padding: 4px 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.theme-menu__title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.theme-menu__subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.theme-menu.is-open {
  display: flex;
}

.theme-menu__item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0b1220;
  padding: 12px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.theme-menu__item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.theme-menu__item:active {
  transform: translateY(1px);
}

.theme-menu__icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.12);
}

.theme-menu__label {
  font-weight: 600;
}

.theme-menu__item.is-active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand);
}

.theme-menu__item.is-active .theme-menu__icon {
  background: rgba(37, 99, 235, 0.14);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 16px;
  padding-top: 6px;
}

.sidebar .nav-btn {
  color: rgba(51, 65, 85, 0.85);
  position: relative;
}

.sidebar .nav-btn::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: rgba(248, 250, 252, 0.98);
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.sidebar .nav-btn:hover::after,
.sidebar .nav-btn:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.icon-btn,
.nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease, color 160ms ease;
}

.icon-btn svg,
.nav-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn i,
.nav-btn i {
  font-size: 22px;
  line-height: 1;
}

.nav-btn .nav-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-btn:hover,
.nav-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

.icon-btn:active,
.nav-btn:active {
  transform: translateY(1px);
}

.nav-btn.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--brand);
}

.nav-btn--spot {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: rgba(96, 165, 250, 0.22);
}

.main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h);
  min-height: 0;
  overflow: hidden;
}

#Gral_View {
  flex: 1;
  min-height: 0;
  display: flex;
}

#Gral_View > * {
  flex: 1;
  min-height: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.topbar__group {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.topbar__group--menu {
  width: var(--sidebar-w);
  justify-content: center;
}

.topbar__group--logo {
  width: 180px;
  padding-top: 0;
  padding-bottom: 0;
}

.topbar__group--icons {
  flex: 1;
  justify-content: center;
  gap: 10px;
}

.topbar__group--owners {
  width: 220px;
  justify-content: center;
}

.topbar__group--user {
  width: 420px;
  justify-content: flex-end;
  border-right: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #0b1220;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 2px;
}

.brand__name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

.brand__logo {
  display: block;
  max-width: none;
  height: 56px;
  max-height: 56px;
  width: 150px;
  min-width: 150px;
  object-fit: contain;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.topbar__social {
  color: #0b1220;
}

.topbar__link {
  border: 0;
  background: transparent;
  height: 100%;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #0b1220;
  cursor: pointer;
  border-radius: 16px;
  transition: background 160ms ease, transform 120ms ease, color 160ms ease;
}

.topbar__link--compact {
  font-size: 11px;
  text-align: center;
}

.topbar__link:hover {
  background: rgba(15, 23, 42, 0.04);
}

.topbar__link:active {
  transform: translateY(1px);
}

.icon-btn--notify {
  position: relative;
}

.notify-dot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  border: 2px solid var(--surface);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1220;
  background: var(--brand-soft);
  border: 1px solid rgba(37, 99, 235, 0.18);
  cursor: pointer;
}

@media (min-width: 1600px) {
  :root {
    --content-max-w: 100%;
  }
}

@media (min-width: 2200px) {
  :root {
    --content-max-w: 100%;
  }
}

@media (min-width: 3200px) {
  :root {
    --content-max-w: 100%;
  }
}

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }

  .topbar {
    left: 0;
    height: var(--topbar-h);
    flex-wrap: nowrap;
  }

  .topbar__group {
    height: 56px;
  }

  .topbar__group--menu {
    width: 60px;
    padding: 0 8px;
    justify-content: flex-start;
  }

  .topbar__group--logo {
    flex: 1;
    min-width: 0;
  }

  .topbar__group--owners {
    display: none;
  }

  .topbar__group--icons {
    display: none;
  }

  .topbar__group--user {
    width: auto;
    padding: 0 8px;
    gap: 8px;
  }

  .topbar__social {
    display: flex;
  }

  .avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .topbar__link--compact {
    display: none;
  }

  .main {
    padding-top: var(--topbar-h);
  }
}

@media (max-width: 480px) {
  .icon-btn--notify {
    display: none;
  }

  .topbar__social:not(:nth-last-child(2)) {
    display: none;
  }

  .topbar__group--user {
    gap: 6px;
    padding: 0 6px;
  }

  .topbar__group--menu {
    width: 50px;
    padding: 0 6px;
  }

  .brand__logo {
    height: 48px;
    max-height: 48px;
    width: auto;
    min-width: auto;
  }
}