:root {
  --shu-bg: #ffffff;
  --shu-primary: #1877f2;
  --shu-primary-dark: #1d4ed8;
  --shu-indigo: #4338ca;
  --shu-text: #111827;
  --shu-muted: #6b7280;
  --shu-border: #e5e7eb;
  --shu-danger: #dc2626;
}

.shu-top-nav,
.shu-top-nav * {
  box-sizing: border-box;
}

.shu-top-nav {
  position: sticky;
  top: 0;
  z-index: 5000;
  background: var(--shu-bg);
  border-bottom: 1px solid var(--shu-border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.shu-brand:hover .shu-brand-title {
  opacity: 0.82;
}

.shu-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--shu-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.shu-brand:hover .shu-brand-icon {
  transform: scale(1.03);
}

.shu-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--shu-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.shu-brand-icon .shu-check-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
}

.shu-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.shu-brand-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--shu-text);
  white-space: nowrap;
}

.shu-brand-title span {
  color: var(--shu-primary);
}

.shu-date-header {
  margin-top: 3px;
  color: var(--shu-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.shu-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shu-menu-wrap {
  position: relative;
}

.shu-grid-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.shu-grid-menu-btn:hover,
.shu-grid-menu-btn.open {
  background: #f3f4f6;
  color: var(--shu-primary);
}

.shu-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--shu-primary), var(--shu-indigo));
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.shu-avatar-btn:hover,
.shu-avatar-btn.open {
  transform: scale(1.05);
}

.shu-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  background: #ffffff;
  border: 1px solid #f1f2f4;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  z-index: 5100;
  overflow: hidden;
}

.shu-menu-panel.show {
  display: block;
}

.shu-apps-panel {
  width: 260px;
  padding: 10px;
}

.shu-profile-panel {
  width: 280px;
  padding: 8px 0;
}

.shu-app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.shu-menu-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.shu-menu-link:hover {
  background: #eff6ff;
  color: var(--shu-primary-dark);
}

.shu-menu-link.active {
  background: #eff6ff;
  color: var(--shu-primary-dark);
  font-weight: 800;
}

.shu-menu-icon {
  width: 22px;
  height: 22px;
  text-align: center;
  font-size: 17px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shu-profile-head {
  padding: 10px 16px 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 4px;
}

.shu-profile-subtitle {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.shu-profile-name {
  color: #374151;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shu-menu-section {
  padding: 9px 16px 3px 16px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shu-menu-separator {
  height: 1px;
  background: #f3f4f6;
  margin: 6px 0;
}

.shu-danger {
  color: var(--shu-danger) !important;
}

.shu-danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

.shu-admin {
  color: #7c3aed !important;
}

@media (max-width: 520px) {
  .shu-top-nav {
    padding: 10px 12px;
  }

  .shu-brand-title {
    font-size: 18px;
  }

  .shu-date-header {
    font-size: 12px;
  }

  .shu-nav-actions {
    gap: 8px;
  }

  .shu-apps-panel,
  .shu-profile-panel {
    width: min(260px, calc(100vw - 24px));
  }
}
