:root {
  --shell-bg-a: #07111f;
  --shell-bg-b: #0b1730;
  --shell-bg-c: #122346;
  --shell-line: rgba(126, 228, 255, 0.16);
  --shell-line-strong: rgba(126, 228, 255, 0.28);
  --shell-text: #edf7ff;
  --shell-text-soft: #aac0d9;
  --shell-accent: #3ba8ff;
  --shell-accent-2: #72e6ff;
  --shell-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --app-shell-offset: 106px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(59, 168, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(114, 230, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(10, 18, 36, 1));
}

.app-shell {
  position: sticky;
  top: 0;
  z-index: 950;
  border-bottom: 1px solid var(--shell-line);
  background:
    radial-gradient(circle at 10% 0%, rgba(114, 230, 255, 0.09), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(59, 168, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(9, 19, 40, 0.97), rgba(8, 17, 34, 0.95));
  backdrop-filter: blur(20px);
  box-shadow: var(--shell-shadow);
}

.app-shell::before,
.app-shell::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: auto;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.45;
}

.app-shell::before {
  width: 160px;
  height: 160px;
  background: rgba(59, 168, 255, 0.18);
  top: -72px;
  left: -32px;
}

.app-shell::after {
  width: 140px;
  height: 140px;
  background: rgba(114, 230, 255, 0.14);
  top: -60px;
  right: 20px;
}

.app-shell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px 8px;
  position: relative;
  z-index: 1;
}

.app-shell-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-shell-logo-box {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #4ec1ff, #175df2);
  box-shadow:
    0 16px 26px rgba(7, 24, 74, 0.34),
    inset 0 2px 5px rgba(255, 255, 255, 0.24),
    inset 0 -8px 14px rgba(7, 19, 46, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.app-shell-logo-box img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.app-shell-brand-copy {
  min-width: 0;
}

.app-shell-brand-title {
  color: var(--shell-text);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -0.3px;
}

.app-shell-brand-subtitle {
  color: var(--shell-text-soft);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.app-shell-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.app-shell-chip,
.app-shell-user,
.app-shell-action {
  border-radius: 16px;
  border: 1px solid var(--shell-line);
  background: linear-gradient(180deg, rgba(17, 33, 64, 0.96), rgba(12, 24, 46, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.16);
}

.app-shell-chip {
  padding: 8px 12px;
  color: var(--shell-text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.app-shell-user {
  padding: 8px 12px;
  min-width: 130px;
}

.app-shell-user-name {
  color: var(--shell-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.app-shell-user-role {
  color: var(--shell-text-soft);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.1;
}

.app-shell-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--shell-text);
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.app-shell-action:hover,
.app-shell-item:hover {
  transform: translateY(-1px);
  border-color: var(--shell-line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 28px rgba(0,0,0,0.24);
  text-decoration: none;
}

.app-shell-action-icon {
  font-size: 14px;
  line-height: 1;
}

.app-shell-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0 16px 14px;
  scrollbar-width: none;
}

.app-shell-nav::-webkit-scrollbar {
  display: none;
}

.app-shell-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 15px 10px 11px;
  border-radius: 20px;
  border: 1px solid var(--shell-line);
  background: linear-gradient(180deg, rgba(21, 40, 74, 0.96), rgba(11, 22, 45, 0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 24px rgba(0,0,0,0.18);
  color: var(--shell-text);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.app-shell-item.is-active {
  border-color: rgba(114, 230, 255, 0.45);
  background: linear-gradient(180deg, rgba(38, 69, 122, 0.98), rgba(16, 31, 62, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(114, 230, 255, 0.12),
    0 16px 28px rgba(0,0,0,0.22);
}

.app-shell-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  background: linear-gradient(145deg, #49b7ff, #1d67ff);
  box-shadow:
    0 10px 20px rgba(6, 20, 60, 0.32),
    inset 0 2px 5px rgba(255,255,255,0.28),
    inset 0 -8px 14px rgba(4, 18, 46, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.app-shell-label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  color: var(--shell-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.1px;
}

.tone-blue .app-shell-icon,
.tone-blue.app-shell-action { background-image: linear-gradient(145deg, #48b7ff, #1a61ff); }
.tone-cyan .app-shell-icon,
.tone-cyan.app-shell-action { background-image: linear-gradient(145deg, #57e8ff, #1496ff); }
.tone-green .app-shell-icon,
.tone-green.app-shell-action { background-image: linear-gradient(145deg, #39e2b2, #069669); }
.tone-violet .app-shell-icon,
.tone-violet.app-shell-action { background-image: linear-gradient(145deg, #a78bfa, #6d28d9); }
.tone-red .app-shell-icon,
.tone-red.app-shell-action { background-image: linear-gradient(145deg, #ff7a91, #d9304d); }
.tone-amber .app-shell-icon,
.tone-amber.app-shell-action { background-image: linear-gradient(145deg, #ffc95a, #f08b16); }

.tone-green.app-shell-action,
.tone-violet.app-shell-action,
.tone-red.app-shell-action,
.tone-amber.app-shell-action,
.tone-cyan.app-shell-action,
.tone-blue.app-shell-action {
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.app-shell-item.tone-green.is-active,
.app-shell-item.tone-green:hover { border-color: rgba(57,226,178,0.45); }
.app-shell-item.tone-violet.is-active,
.app-shell-item.tone-violet:hover { border-color: rgba(167,139,250,0.45); }
.app-shell-item.tone-red.is-active,
.app-shell-item.tone-red:hover { border-color: rgba(255,122,145,0.42); }
.app-shell-item.tone-amber.is-active,
.app-shell-item.tone-amber:hover { border-color: rgba(255,201,90,0.42); }

.app-shell-spacer {
  height: 8px;
}

@media (max-width: 980px) {
  :root { --app-shell-offset: 118px; }

  .app-shell-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell-meta {
    width: 100%;
    justify-content: space-between;
  }

  .app-shell-user {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  :root { --app-shell-offset: 128px; }

  .app-shell-top {
    padding: 12px 12px 8px;
    gap: 10px;
  }

  .app-shell-nav {
    padding: 0 12px 12px;
    gap: 8px;
  }

  .app-shell-brand-title {
    font-size: 17px;
  }

  .app-shell-brand-subtitle {
    font-size: 10px;
  }

  .app-shell-chip,
  .app-shell-user,
  .app-shell-action {
    min-height: 42px;
  }

  .app-shell-action-label {
    display: none;
  }

  .app-shell-item {
    min-height: 52px;
    padding: 9px 12px 9px 10px;
    border-radius: 18px;
  }

  .app-shell-icon {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .app-shell-label {
    font-size: 12px;
  }
}
